Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2007

Tip: Looking for answers? Try searching our database.

Append Query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DanielWalters6 - 09 Nov 2007 11:32 GMT
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
John Spencer - 09 Nov 2007 12:19 GMT
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.
Signature

John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.

>I have an append query which enters data into a table to do with the
>session.
[quoted text clipped - 9 lines]
>
> Dan
DanielWalters6 - 09 Nov 2007 17:35 GMT
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
Ofer Cohen - 09 Nov 2007 12:23 GMT
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.

Signature

Good Luck
BS"D

> I have an append query which enters data into a table to do with the session.
> (ie a Log File)
[quoted text clipped - 7 lines]
>
> Dan
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.