JackieEVSC
Registered User.
- Local time
- Today, 08:30
- Joined
- Feb 24, 2012
- Messages
- 26
I have a db where users can search for various things, which could be alpha, numeric, or alphanumeric. Right now, the code stands as such:
DoCmd.Close acForm, "frm_RepairMenu"
On Error GoTo fErr
DoCmd.OpenForm "frm_RepairInfo-Notes"
Exit Sub
fErr:
DoCmd.OpenForm "frm_RepairMenu", View:=acNormal, OpenArgs:="SearchRep"
If a record is found or if the search is canceled, it works perfectly. However, if no records are found, the db currently displays a screen with a header and no information. At this point, you have to quit Access, then reopen the db to search again. (I have all the control buttons disabled in the database so that they don't close a form and have no way to navigate.)
I need a message box to tell the user "No records found.", and when "ok" is clicked, they go back to the repair menu on the search repairs tab. I have searched these forums (and the internet) for help, and I can't seem to find the answer. I know it's a simple thing to do, I just can't figure it out! Can someone help me with this? Thanks.
DoCmd.Close acForm, "frm_RepairMenu"
On Error GoTo fErr
DoCmd.OpenForm "frm_RepairInfo-Notes"
Exit Sub
fErr:
DoCmd.OpenForm "frm_RepairMenu", View:=acNormal, OpenArgs:="SearchRep"
If a record is found or if the search is canceled, it works perfectly. However, if no records are found, the db currently displays a screen with a header and no information. At this point, you have to quit Access, then reopen the db to search again. (I have all the control buttons disabled in the database so that they don't close a form and have no way to navigate.)
I need a message box to tell the user "No records found.", and when "ok" is clicked, they go back to the repair menu on the search repairs tab. I have searched these forums (and the internet) for help, and I can't seem to find the answer. I know it's a simple thing to do, I just can't figure it out! Can someone help me with this? Thanks.