How to display message box in query?
When you click open to run a query on a database and type information into the Enter Parameters Value dialog box, the dialog box that displays when you click open, in this particular case a three or four digit number; and click the OK button and the information is not there: How do you get a message box to display a message? "Number not found". That is what I have been trying to do with no success. I begin by clicking on Forms in Access and then clicking on Design. Once visual Basic Forms comes up I click on the toolbox icon on the Control Menu icon toolbar. I put a text box and a command button on the form. That is as far as I go. I do not know what code to write. My database is on my C drive ("C:\lottery\lottery numbers.mdb")
Below are some of the records that are in my database. If anyone can create the database I have below you will see what I am trying to do. If you create the database below, you can just enter the first record in the field columns if you want to. Once you create the database and add a query to it and then open the query and enter a three or four digit number that is not in the database or even you can type one of the numbers that I have below in any order into the Enter Parameters Value dialog box and hit OK, a Select Query dialog box will appear with a blinking cursor in an empty record row. I can live with that because I know the number is not there. But I just want to have a message box to pop up displaying a message: "Number not found". I would appreciate anybody's help in how to write code to include a message box. Thanks. Tyrone!
I have a database that has 2 fields: Header; Three digit NH Four digit low to high
Header Three digit NH Four digit MA low to high
In the Design menu for query the wording I used for Criteria [Type Three digit NH Four digit MA, low to high]