daveatthewell
New Member
- Joined
- Jul 28, 2006
- Messages
- 43
I have two membership type databases (they are in no way connected, I mention both for illustrative purposes) Both use a form to input data, the control source for each form is a query and each query updates respective tables. In both databases, there is a Command Button the purpose of which is to find a record based on the member's surname ie a Find button which calls the built in "Find and Replace" dialog. The code generated by Access is identical viz:
In one database the command button works as intended, Displays the built-in Find and Replace dialog and displays the first record found with that surname; clicking the "Next" button (on the dialog) finds the next records (assuming one exists).
On the other database, the Command button brings up the dialog, finds the first record, but refuses to find any further records (which do exist and are spelt correctly with no trailing or leading spaces) displaying the message that "Microsoft Access finished searching the records. The search item was not found". If I close the dialog and click the command button again, then click Find, it finds the next record, but again doesn't find subsequent records. Where is the code for the "Find Next" button on the dialog stored because it's obviously not receiving the search parameters.
Anyone got any thoughts on this one?
BTW including:
which I believe is generated with a Find Next Command button has no effect.
Regards Dave
Code:
Private Sub cmdFind_Click()
Me![LastName].SetFocus
DoCmd.RunCommand acCmdFind
End Sub
In one database the command button works as intended, Displays the built-in Find and Replace dialog and displays the first record found with that surname; clicking the "Next" button (on the dialog) finds the next records (assuming one exists).
On the other database, the Command button brings up the dialog, finds the first record, but refuses to find any further records (which do exist and are spelt correctly with no trailing or leading spaces) displaying the message that "Microsoft Access finished searching the records. The search item was not found". If I close the dialog and click the command button again, then click Find, it finds the next record, but again doesn't find subsequent records. Where is the code for the "Find Next" button on the dialog stored because it's obviously not receiving the search parameters.
Anyone got any thoughts on this one?
BTW including:
Code:
Screen.ActiveControl.SetFocus
Regards Dave