I am working with vb6, to find record for one client I have to use arrow key to navigate through client form till I find the record for that client. So I use code below and is working fine, but I think there is easy way to search client form by insetting text box in client form and search record e.g. by phone number.
With rsClientNavigate
If .State = 1 Then
If .RecordCount > 0 Then
.MoveLast
Call FillclientInfo
End If
End If
End With
In ms access I use this code to find certain client by insetting this code on text box on after update event is working fine, but it wouldn’t work in vb6
Dim rs As DAO.Recordset
If Not IsNull(Me.clientphone) Then
'Save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[phone] = """ & Me.clientphone& """"
If rs.NoMatch Then
MsgBox "Not Found ," & vbCrLf & "Please enter a new phone number.", vbExclamation, "client form"
Else
'Display the found record in the form.
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
So I need help to fix this code to work with vb6
Thank you,
With rsClientNavigate
If .State = 1 Then
If .RecordCount > 0 Then
.MoveLast
Call FillclientInfo
End If
End If
End With
In ms access I use this code to find certain client by insetting this code on text box on after update event is working fine, but it wouldn’t work in vb6
Dim rs As DAO.Recordset
If Not IsNull(Me.clientphone) Then
'Save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[phone] = """ & Me.clientphone& """"
If rs.NoMatch Then
MsgBox "Not Found ," & vbCrLf & "Please enter a new phone number.", vbExclamation, "client form"
Else
'Display the found record in the form.
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
So I need help to fix this code to work with vb6
Thank you,