Selection Query to Form

NNothard

Registered User.
Local time
Today, 23:53
Joined
Jun 7, 2006
Messages
18
I wonder if anyone can help with this:

I have put a selection query as a subform in a form which shows client details. When the form opens from the switchboard it asks the user to enter the clients unique number and then the query links the number to the client ID (autonumber) which then populates the form with all the details for that client. This is all great but I have 2 questions?

1. If I put in an incorrect number or press cancel the form loads anyway with no record. Is there a way to force the user to re-enter the number or if the number does not exist say so, and then return to the switchboard. The aim of this form is for reference and not data entry anyway.

2. Once in the form correctly is there a way to 'refresh' the form so that it asks for the card number again. My plan is to have a button "search for another client" and when it is pressed the query runs again and the input box comes up.

Cheers
 
I would have a combo box that shows all current client numbers
(this would stop the user entering non existant client numbers)
Select the Client number
In the after update of the combo box or the on click of a button (I would use a button)you can run your query (don't forget to type forms![Yourform]![yourcombobox] in the criteria section of the client number column in the query)
 

Users who are viewing this thread

Back
Top Bottom