Query Updates Being called from Macro Not Executing

A

ae

I have about 15 update queries being called from a Macro, and they are 1
insert and 14 updates.

Sometimes they update perfect, but other times I get one or two that don't.
I then identified it and manually try to update it, but then when I do that
the first time it doesn't update and opens it up like in SELECT mode (or
spreadsheet).

The Macro itself does have VIEW set as Datasheet, but that is how Microsoft
recommends it. I changed it to Print Preview before but that only made it
worse.

Has anybody out there ran into my situation before, and how was that
corrected? Thanks.
 
M

Michel Walsh

Hi,


Use VBA code rather than macro. Try the dbFailOnError:


...
On Error Goto LabelForError
CurrentDb.Execute "ActionQueryHere", dbFailOnError
...

Exit whatever
LabelForError:
...


End whatever





Hoping it may help,
Vanderghast, Access 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

Top