HarrySpencer
Registered User.
- Local time
- Today, 23:29
- Joined
- Apr 10, 2007
- Messages
- 25
Hello,
I've been using the following code for ages but wanted to change the fields being search because if the search field(NiNo) is blank it wouldn't return any results or jump to that record. Now trying to use the PersonalID field but having problems matching the data types.
The code runs when double clicking on one of the results fields from a continous form that use a query to search the DB based on surname.
Dim rst As Recordset
Set rst = Forms![MainPage_fm].RecordsetClone
rst.FindFirst "[NiNo]='" & Me![txtNiNo] & "'"
If rst.NoMatch = False Then
Forms![MainPage_fm].Bookmark = rst.Bookmark
End If
DoCmd.Close acForm, "SearchDOB_cfm", acSaveNo
changed line 4 to...
rst.FindFirst "[PersonalID]='" & Me![PersonalID] & "'"
but get a data type have tried to use the Val function but still having problems.
Any ideas would be greatly appreciated? Cheers.
I've been using the following code for ages but wanted to change the fields being search because if the search field(NiNo) is blank it wouldn't return any results or jump to that record. Now trying to use the PersonalID field but having problems matching the data types.
The code runs when double clicking on one of the results fields from a continous form that use a query to search the DB based on surname.
Dim rst As Recordset
Set rst = Forms![MainPage_fm].RecordsetClone
rst.FindFirst "[NiNo]='" & Me![txtNiNo] & "'"
If rst.NoMatch = False Then
Forms![MainPage_fm].Bookmark = rst.Bookmark
End If
DoCmd.Close acForm, "SearchDOB_cfm", acSaveNo
changed line 4 to...
rst.FindFirst "[PersonalID]='" & Me![PersonalID] & "'"
but get a data type have tried to use the Val function but still having problems.
Any ideas would be greatly appreciated? Cheers.