PeterT
09-18-2008, 08:22 AM
I have a form wherein I have included a search button. Having filled in the the bits I want I save the record. Then I want to click the search button for the next record to update. When I do so I get the error message saying something about control and giving me three choices as follows:-
1. Add a 'Go to Control Action'before the 'Find Record Action'.
2. For the 'find record Action' change the 'only current field action' argument from 'yes' to 'no'
3. Change the focus to a searchable control.
What I want to do is to update the record and then go immediatley to the next one via the search button whereas at present I have to close the form and re-open before I can do so. The VB coding is given below:
Private Sub Staff_list_find_button_Click()
On Error GoTo Err_Staff_list_find_button_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_Staff_list_find_button_Click:
Exit Sub
Err_Staff_list_find_button_Click:
MsgBox Err.Description
Resume Exit_Staff_list_find_button_Click
End Sub
Qjuestion:
Where exactly do I put any of the actions suggested and which do you consider the most effective for my purpose?
Thanks folks
1. Add a 'Go to Control Action'before the 'Find Record Action'.
2. For the 'find record Action' change the 'only current field action' argument from 'yes' to 'no'
3. Change the focus to a searchable control.
What I want to do is to update the record and then go immediatley to the next one via the search button whereas at present I have to close the form and re-open before I can do so. The VB coding is given below:
Private Sub Staff_list_find_button_Click()
On Error GoTo Err_Staff_list_find_button_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_Staff_list_find_button_Click:
Exit Sub
Err_Staff_list_find_button_Click:
MsgBox Err.Description
Resume Exit_Staff_list_find_button_Click
End Sub
Qjuestion:
Where exactly do I put any of the actions suggested and which do you consider the most effective for my purpose?
Thanks folks