officemanager2
Technical User
I have the following code tied into a button which is supposed to close the
form and put the enduser back at the switchboard.
The form uses combo boxes to search contacts in the database. The issue I'm
having is if the end user starts a search and then does not want to complete
they will ideally be able to hit the button and go back to the swtichboard.
What is happening though is when they click the button to close the form they
instead get sent to the closest record based on the search critiera entered
to that point.
I've tried Docmd.Open after the DoCmd.Close but this would not work.
Any suggestions?
form and put the enduser back at the switchboard.
Code:
Private Sub searchtoswitch_Click()
On Error GoTo Err_searchtoswitch_Click
If Me.Dirty Then Me.Dirty = False
DoCmd.Close acForm, "FNsearchform"
Exit_searchtoswitch_Click:
Exit Sub
Err_searchtoswitch_Click:
MsgBox Err.Description
Resume Exit_searchtoswitch_Click
End Sub
having is if the end user starts a search and then does not want to complete
they will ideally be able to hit the button and go back to the swtichboard.
What is happening though is when they click the button to close the form they
instead get sent to the closest record based on the search critiera entered
to that point.
I've tried Docmd.Open after the DoCmd.Close but this would not work.
Any suggestions?