Error Messages

C

crader

Here’s the deal. The reason that DJJ couldn’t get logged on was because
there was already an entry for him in a table called ‘Current User Table’.
This table contains a record with the initials of each user that is logged
on. When a user logs on, the initials they enter on the screen are compared
with the entries in the table. If their initials already exist in the table
it is SUPPOSED to mean that they are already logged on somewhere else and
must log off there before that can log on somewhere else.

OK, here’s my theory as to why this doesn’t always work properly. If the
global property settings for Access are not set properly, there are
opportunities for users to see and respond to prompts that they should never
see. If they respond to any of these prompts incorrectly then the database
cannot function properly.

For example, in the case of DJJ, if these settings are incorrect, when he
exits the database he will get a prompt asking him if he wants to run a
delete query. If he says ‘yes’ everything is OK. If he says ‘no’ then his
initials are not removed from the Current User Table and next time he tries
to log on he can’t because the database thinks he is already is.

Prompts such as these can pop up in all kinds of different places and cause
all kinds of problems. It happens, I think, because, and we’ve talked about
this on a number of occasions, for some reason as a matter of daily or weekly
processing, the Access program on everyone’s machines is refreshed with a new
copy which has improper default settings for running this database. If you
could keep this from happening then these types of problems wouldn’t occur.

Does anyone have any idea how to "fix" this problem
 
D

Douglas J. Steele

There's nothing in Access that I'm aware of that will ask a user whether or
not he wants to run a delete query. What there can be, though, is a prompt
along the lines of "You're about to delete n rows. Do you want to
continue?". If that's what you're seeing, then your code is telling Access
to run the delete query (without prompting the user), but Access is asking
for confirmation that what it's about to do is okay.

To avoid the confirmation prompt, either issue a DoCmd.SetWarnings False
before running the query (and then DoCmd.SetWarnings True after running it),
or (preferable in my opinion) use the Execute method of either the Database
object or the QueryDef object.

There is a way to turn the Warnings off for the entire application (on the
Edit/Find tab under Tools | Options from the menu bar), but I don't
recommend using it, as there may be times when the warnings are useful.
 
C

crader

I'll give it a try. Thank you for your time.

Douglas J. Steele said:
There's nothing in Access that I'm aware of that will ask a user whether or
not he wants to run a delete query. What there can be, though, is a prompt
along the lines of "You're about to delete n rows. Do you want to
continue?". If that's what you're seeing, then your code is telling Access
to run the delete query (without prompting the user), but Access is asking
for confirmation that what it's about to do is okay.

To avoid the confirmation prompt, either issue a DoCmd.SetWarnings False
before running the query (and then DoCmd.SetWarnings True after running it),
or (preferable in my opinion) use the Execute method of either the Database
object or the QueryDef object.

There is a way to turn the Warnings off for the entire application (on the
Edit/Find tab under Tools | Options from the menu bar), but I don't
recommend using it, as there may be times when the warnings are useful.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top