一下一段用VB作的小区物业管理系统中“查找”部分的代码,
但是却不能运行
求高人指点一下,小女子深表感谢Private Sub Command5_Click()
If Text1.Locked = True Or Text2.Locked = True Or Text3.Locked = True Or Text4.Locked = True Or Text5.Locked = True Then
    Text1.Locked = False
    Text2.Locked = False
    Text3.Locked = False
    Text4.Locked = False
    Text5.Locked = False
    MsgBox "请输入查找编号"
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = ""
    Text1.SetFocus
    Else
    Dim a
    a = "投诉编号=" & "'" & Text1.Text & "'"
    Data1.Recordset.FindFirst a
    If Data1.Recordset.NoMatch Then
       MsgBox "没有此记录"
       Else
           Text1.Locked = True
           Text2.Locked = True
           Text3.Locked = True
           Text4.Locked = True
           Text5.Locked = True
    End If
End If
End Sub