Error msg on a form if nothing is found in the query?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create a sign-on form. I have a form that requests the user
to enter their id. Then I query to find the code in my table that goes with
their id. If the id is wrong (not found in the table), it just sends back a
blank form.
How could I send them back to the form with the fields on it so they can
re-enter their id?
Is it possible to put a message on the form that says try again?
Can a make a message that will only show on the form when there's an error?

Is this something I could do in an Event Procedure? I don't know Visual
Basic, so I'm afraid I'm in over my head. Any help would be greatly
appreciated. :)
 
Why are you doing this? Access has security features built in. Your method
will never be very secure. What prevents your users from bypassing all this
on open? What prevents them from linking to your tables and seeing
everyone's Id and password?

If you don't know visual basic, you certainly should not be trying to invent
a security system and expect it to be better than the built-in User Level
Security.
 
It's not really a security thing......I have two tables that are both
imported from main frame files. One table has the id and their code. The
other table has all of their products with their code on them. When they
enter my little system, they enter their id. I grab their code and then they
can do reports, etc. just for their products. I'm not trying to lock them
out of anything. They are free to look at any of the other products.
My problem was that if they enter an id that isn't in the table, I was just
getting a blank form. I need a way to allow them to re-enter their id.
 
One way to handle this would be to use a combo-box on that form that
contains a list of valid IDs. Then they can select their ID from that box
instead of typing it. Of course, if they type it it will jump down the list
to the correct one.

There may be other error checking that can be Deon. Hopefully some others
will jump in with ideas.
 
That is certainly an option I hadn't thought of. Maybe I was just making it
too difficult. I thought I would have to check for my query results to be
empty.

Any tips on the combo box? I haven't done one of those yet either.
 
Back
Top