A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query Confirmations still opening



 
 
Thread Tools Display Modes
  #1  
Old February 3rd, 2010, 04:18 PM posted to microsoft.public.access.tablesdbdesign
tighe
external usenet poster
 
Posts: 53
Default Query Confirmations still opening

all,

i figure my solution is to turn off warnings, but i wondered if any knew why
query confirmations are still happening when the user says the "confirm" in
Editing Advanced Options are unchecked: Record changes, Document Deletions,
Action Queries. the user is usually offsite and have no direct access to
check whether this is actually true.

if any knows why the issue is occurring or has a better solution let me
know, TIA.
  #2  
Old February 3rd, 2010, 04:50 PM posted to microsoft.public.access.tablesdbdesign
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Query Confirmations still opening

You need to to use Set Warnings in code or a macro. Below is an example of a
Make Table query. You could do something similar with a macro and a saved
query. You SetWarnings to False before doing the query. Then, and this is
important, set it back to True afterwards.

Public Sub DoSQL()

Dim SQL As String

DoCmd.SetWarnings False
SQL = "SELECT * INTO Backlog FROM ASA "

DoCmd.RunSQL SQL
DoCmd.SetWarnings True

End Sub
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"tighe" wrote:

all,

i figure my solution is to turn off warnings, but i wondered if any knew why
query confirmations are still happening when the user says the "confirm" in
Editing Advanced Options are unchecked: Record changes, Document Deletions,
Action Queries. the user is usually offsite and have no direct access to
check whether this is actually true.

if any knows why the issue is occurring or has a better solution let me
know, TIA.

  #3  
Old February 3rd, 2010, 06:35 PM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Query Confirmations still opening

On Wed, 3 Feb 2010 07:50:06 -0800, Jerry Whittle
wrote:

You need to to use Set Warnings in code or a macro. Below is an example of a
Make Table query. You could do something similar with a macro and a saved
query. You SetWarnings to False before doing the query. Then, and this is
important, set it back to True afterwards.

Public Sub DoSQL()

Dim SQL As String

DoCmd.SetWarnings False
SQL = "SELECT * INTO Backlog FROM ASA "

DoCmd.RunSQL SQL
DoCmd.SetWarnings True

End Sub


Even better, in my experience, is to avoid the RunSQL method altogether;
instead use the Execute method:

Dim SQL As String
On Error GoTo Proc_Err
SQL = "SELECT * INTO Backlog FROM ASA"
Application.Execute SQL, dbFailOnError
other code

Proc_Exit:
Exit Sub
Proc_Err:
handle any errors generated by the query
Resume Proc_Exit
--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.