Append Query

G

Guest

I have an append query which enters data into a table to do with the session.
(ie a Log File)

However, this query is ran in the autoexec query I've built.

Is there a way to turn off the confirm the message about appending data and
to remove the warning that it's going to add 1 record to my table?

thank you for your help

Dan
 
J

John Spencer

There is a way. The solution depends on how you are running the query.

Are you using a MACRO to run the query or are you using VBA to run the
query?
If you are using a macro, then use
Set Warnings No to turn off the warning messages
Run the query
Set Warnings Yes to turn the warning messages back on

If you are using VBA code to run the query - you can use the above technique
DoCmd.SetWarnings False
Execute your query between these.
DoCmd.SetWarnings True

One problem with this technique is that if an error occurs while running the
SQL you could end up with the warnings turned off for the duration of your
session. NOT a good thing.

IF you are using VBA to execute the query, you may have a better option than
the one you are using. Post your VBA for suggestions.
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
G

Guest

I assumeyou run the qury through the AutoExec Macro, if that the case before
running the query add another line and select SetWarnings and set it to No.

After the line of running the query add another line and set the SetWarnings
back to Yes.
 
G

Guest

Thank you for your help.

I have now solved this issue on my own...

I created a one line autoexec macro using access' grid thing...
RunCode:
Then it asks for the name of a function.
I made a small function with some code, I found on another site.

To benefits others I will repost to this question with my code. I don't have
access to it at this time.

Thank you for your help

DAN
 

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

Similar Threads


Top