in a macro, use a SetWarnings action before the OpenQuery action, setting
warnings to False.
in VBA, use a SetWarnings action before AND after the OpenQuery action,
setting warnings to False and then back to True. (in a macro, warnings is
reset to True automatically after the macro ends.)
or, in VBA, use
CurrentDb.Execute "MyQueryName", dbFailOnError
instead of DoCmd.OpenQuery.
hth
> I am trying to automate a procedure where a table is automatically made,
> using a make table query, when the user pushes a button to save a record.
[quoted text clipped - 15 lines]
>
> Charles
Charles - 03 Oct 2005 15:13 GMT
Thank you very much. I used the SetWarnings Action in VBA and it worked
fine.
I do have one more warning message that keeps coming up and not sure how to
go about getting rid of it. I have a button that duplicates a record.
Whenever the user exits the form they get a warning message that states:
"You copied a large amount of data onto the clipboard - Do you want to save
this data on the clipboard". Currently, I have told the users to just click
the "No" button whenever they see this message. If I use the SetWarnings
Action on the "On Close" event how would I turn it back on? Also, if I do
set the SetWarnings Action to False, does that mean the data will
automatically be saved to the clipboard?
Thank You
> in a macro, use a SetWarnings action before the OpenQuery action, setting
> warnings to False.
[quoted text clipped - 35 lines]
> >
> > Charles
tina - 04 Oct 2005 03:48 GMT
you've got me stumped with that one, Charles. you might be able to get
around the problem by using an Append query to add a duplicate record
(though i do cringe a bit at the thought of a duplicate record in a table)
rather than a copy/paste solution. other than that, suggest you wait until
10/4 morning to see if anyone else picks up this thread - if not, you might
want to post it again in a new thread.
hth
> Thank you very much. I used the SetWarnings Action in VBA and it worked
> fine.
[quoted text clipped - 57 lines]
> > >
> > > Charles