Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Help

Status
Not open for further replies.

xeb

Technical User
Nov 14, 2003
81
US
Hi:

I searched for an answer to this but I can't find anything.

I have a query that prompts the user to enter their status number (0, 1, 2, 3, or 4). If their status is anything other than "4" they are not allowed to continue. If they do anyway (which is how it is set-up now) it won't do them any good because when they go to the next step in the process (printing the form that opens) we'll cross check it anyway and see that their status is not "4" and therefore we won't process their request. However, I'd like the query to "stop" if they enter anything other than a "4" or at least have a message box that displays a warning open or something like that.

Can this be done?

Thanks,

xeb
 
How can a query not allow someone to continue (but if they do anyway)?

You never provide any information on the "process" or "requests"...

A query can't stop anything. What do you want to stop?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
how are you getting the user parameter (0,1,2,3,4) now? Is your query set up like:

SELECT * FROM WHERE [Please enter status number]

If you create your own form to get the parameter, you can verify that the user has entered a valid number.


Leslie
 
Hi:

Thanks for answering.

This database is on a computer that customers access to determine if they've won a prize. They are supposed to access it only if their status is "4" but there is nothing presently that prevents them from accessing it if their status is "0, 1, 2, or 3." Their status is not in the database nor can it be because it changes daily and there are hundreds of customers.

So it presently works on the honor system. But like I said, if they do it and they are not on status "4" we'll catch it later. However, it would be nice to make them enter their status and if it is "0, 1, 2, or 3" have something tell them they are not suppose to continue. Ideally, it would prevent them from continuing. Also, if they type in "0, 1, 2, or 3" and then continue anyway they will be lying so it would be good to make them type it in.

This database consists of one table, one query, and one form. Presently, the query just ask them for the codes that were issued to them and matches those codes with the prizes in the table. They print out the forms with all the details on them and submit them to claim their prizes.

Thanks,

xeb
 
You haven't provided any details from either Leslie or my questions.

Go back to the drawing board and decide exactly what you want for a user interface. Use boxes and lines etc on paper to diagram responses. Sketch out some forms and logic and then see if you have some specific questions.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
xeb said:
However, it would be nice to make them enter their status and if it is "0, 1, 2, or 3" have something tell them they are not suppose to continue. Ideally, it would prevent them from continuing

lespaul said:
If you create your own form to get the parameter, you can verify that the user has entered a valid number.

Once you check the input you can prevent them from continuing.

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top