I am having a bit of a problem when using the find button on a form. When I click the button the search/replace box pops up as below so no problem so far.
The search works fine on the database, but if you have the search box open and you switch to another application I get the message below. It only happens when you move away from the database with the search window open.
But have no idea on how to stop it. It looks like it trying to search the new application.
I am quite new at all this so it might be something silly I have done.
I have put the code I am using on the button below.
Private Sub Search_from_edit_Click()
On Error GoTo Err_Search_from_edit_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_Search_from_edit_Click:
Exit Sub
Err_Search_from_edit_Click:
MsgBox Err.Description
Resume Exit_Search_from_edit_Click
End Sub
Any idea would be of great help as I am lost?