|
Private Sub CmdCourseMngQuery_Click()
Dim sLookFor As String
Dim rs As Recordset
sLookFor = ""
If Text6 <> "" Then
sLookFor = sLookFor & "模具编号='" & Text6 & "' and "
End If
If Text8 <> "" Then
sLookFor = sLookFor & "零件名称='" & Text8 & "' and "
End If
If Text10 <> "" Then
sLookFor = sLookFor & "编程员='" & Text10 & "' and "
End If
If Text12 <> "" Then
sLookFor = sLookFor & "编程完成日期=#" & Text12 & "# and "
End If
If sLookFor <> "" Then
sLookFor = Mid(sLookFor, 1, Len(sLookFor) - 5)
Set rs = Me.加工信息.Form.Recordset
rs.FindFirst sLookFor
If rs.NoMatch Then
MsgBox "没有找到"
End If
Me.加工信息.SetFocus
Me.加工信息.Form.工序ID.SetFocus
Me.加工信息.Form.Recordset.Bookmark = rs.Bookmark
Set rs = Nothing
Else
MsgBox "请输入条件"
End If
End Sub
Private Sub Command36_Click()
Text6 = ""
Text8 = ""
Text10 = ""
Text12 = ""
End Sub
写了一个查找和清空的代码,其它你再完善吧(因为其它的我没有看懂) |
|