Good Morning,
I have a Parameter Query that is the recordsource for fProjInfo. When the user opens fProjInfo a Dialog box appears requesting the user to input a Project Number. Fine!!
Now if the user wants to make another search, (this is the only way I knew how to do it…I’m sure there is something better….but) I put a control button on the form with the following code in the OnClick event:
Function mQ12()
On Error GoTo mQ12_Err
DoCmd.Close acForm, “fProjInfo”
DoCmd.OpenForm “fProjInfo”, acNormal, “”, “”, , acNormal
mQ12_Exit:
Exit Function
mQ12_Err:
MsgBox Error$
Resume mQ12_Exit
End Function
Fine!!!! Until the user inputs a number that doesn’t exist…it only returns a blank form and the only thing that the user can do is Close the DB and re-open.
If the user inputs a number that doesn’t exist, I would like a dialog box to appear and notify the user “no such number, please re-enter a project code” and then run the query again. What do I need to do to accomplish this?
Thanks in advance,