Hey.
I am having trouble with this piece of VBA:
Code:
Dim strWhere As String
Dim rs As DAO.Recordset
strWhere = "[ClientID] = '" & Me.[ClientID] & "'"
DoCmd.OpenForm "Client Details"
With [Forms]![Client Details]
Set rs = .RecordsetClone
rs.FindFirst strWhere
If rs.NoMatch Then
MsgBox "Not found"
Else
.Bookmark = rs.Bookmark
End If
End With
Set rs = Nothing
I am trying to open a form called Client Details, when I have clicked on the unique ClientID, which is displayed in another form.
So basically, once I click on the ID, the Client Details form opens, showing me the clicked entries details, BUT I also want to be able to page through the other clients details. This code is fixing this issue for another form with exactly the same basis (employees instead of clients), but refuses to work for the clients, giving me a type mismatch in criteria expression error.
Any ideas what could be wrong in my table? It works perfectly for the employee table which is 99% the same thing, only different data.
Thanks,
A2k