BradCollins
Technical User
I have created the code as below, and this works fine. However how do I change this so that it looks at two fields to select the correct record.
I need it find a record where cmbTrailerSelect = fldVehicleTrailer (this bit works), but also where txtDateSelect = fldDate
Any help is most appreciated. Thanks
Private Sub cmbTrailerSelect_AfterUpdate()
Dim rst As Recordset
Dim strSearch As String
Set rst = Me.RecordsetClone
strSearch = Str(Me!cmbTrailerSelect)
rst.FindFirst "fldVehicleTrailer = " & strSearch
If rst.NoMatch Then
msgbox "No record with the selected criteria has been found. Please try again.", vbOKOnly, "Westoil Petroleum Pty Ltd"
Else
Me.Bookmark = rst.Bookmark
End If
rst.Close
End Sub