How can I disable error messages in Access?

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

Guest

I have used a scroll box to display project names and allow the user to pull
up and edit info based on the name selected. If the scroll is not returned to
the first project name in the list before the user tries to quit, Access
tosses up a message about "Updates to table were not successful...." and then
a second that says "....problem while trying to save.." I have tried a
variety of things and it is clear that the data has been saved and that the
messages are a result of a change in the filter used. I'd like to disable
the messages or replace them with one of my own. Docmd.setwarnings false
didn't do anything. Any suggestions would be great.
 
I have used a scroll box to display project names and allow the user to pull
up and edit info based on the name selected. If the scroll is not returned to
the first project name in the list before the user tries to quit, Access
tosses up a message about "Updates to table were not successful...." and then
a second that says "....problem while trying to save.." I have tried a
variety of things and it is clear that the data has been saved and that the
messages are a result of a change in the filter used. I'd like to disable
the messages or replace them with one of my own. Docmd.setwarnings false
didn't do anything. Any suggestions would be great.

so... you want to overwrite and destroy the data in your database
without any warnings?

Didn't think so.

If the purpose of the listbox or combo box (I guess that's what you
mean by the non-Access term "scroll box") is just to find a record, be
sure that the Control Source is blank. As it is, it's trying to edit
whatever record you're on (and failing, fortunately).

In general, error and warning messages are there for good reason.
Rather than suppressing them, it's almost always best to fix the
application so no error occurs.

John W. Vinson [MVP]
 
Yes, it is a combo box. I've been in Excel this morning and was a little lazy
in my definition. I can't leave the control source blank or it simply takes
me to the first project in the list every time - regardless of which project
I've picked from the list. I'm actually not worried about losing data
because I have error messages on the individual forms that question (or
disallow) changes that seem inappropriate. Also, regardless of what changes
have been made - or not made - the error messages are initiated by what is
displayed in the combo box. Even if I ignore the messages, there is no change
in my data.

I used the wizard to set up the box and it works fine. It's just closing out
that presents a problem. Even though the error message doesn't say it, the
real error seems to be that the program is trying to change a filter to match
what's in the box. Perhaps I better stick to the simple stuff or find a
better book. Thanks for the input.
 
Yes, it is a combo box. I've been in Excel this morning and was a little lazy
in my definition. I can't leave the control source blank or it simply takes
me to the first project in the list every time - regardless of which project
I've picked from the list. I'm actually not worried about losing data
because I have error messages on the individual forms that question (or
disallow) changes that seem inappropriate. Also, regardless of what changes
have been made - or not made - the error messages are initiated by what is
displayed in the combo box. Even if I ignore the messages, there is no change
in my data.

I used the wizard to set up the box and it works fine. It's just closing out
that presents a problem. Even though the error message doesn't say it, the
real error seems to be that the program is trying to change a filter to match
what's in the box. Perhaps I better stick to the simple stuff or find a
better book. Thanks for the input.

I'm guessing you just used the wrong wizard! If you're using the combo
TO FIND A RECORD in the form, the wizard sets it up as unbound. What
is the Control Source of this combo? Does it show [Event Procedure] in
its AfterUpdate event on the combo properties Events tab? If so,
please click the ... icon by it and post the code. It's simple enough
to get this (very standard) combo operation working - there should be
NO error messages and nothing special happening on "closing it out".

John W. Vinson [MVP]
 

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

Back
Top