4saken ha scritto:
Under Options, Edit/Find.. I've already unchecked the three boxes under
Confirm, but I'm still getting confirmation pop-ups when running queries. I
don't know what else to check to disable these windows from showing up. Any
ideas? Thank you.
Is not a ggod idea to disable from Option the Warnings...!
This one depend by the method used to invoke a query execution.
Using Macro you are any way to disable it...!
Using code you have 2 way:
1)RunSQL metod
This need to set the Warning to false before run SQL statement and
restore it
after execution.
To work with this you need of SetWarnings(WarningsOn) Method Member
of
Access.DoCmd
In OnLineHelp you can fined all you need about it:
DoCmd.SetWarnings False
Docmd.RunSQL "QueryName"
DoCmd.SetWarnings True
You may put This code on a ClickButtonEvent to test it....!
2) Execute Metod
This don't need anything else because work directly on JET db, so a
single code line
is needed.
Execute like Execute(Query As String, [Options]) Member of
DAO.Database
Ex:
strModificaSQL = "UPDATE T1 SET fld1...."
CurrentDb.Execute strModificaSQL
You can also use Execute member of DAO.Connection but..... i don't
think may be
this case.
3) ADO and Execute Method member of ADODB.Connection
This don't require any Warnings Mask....
CurrentProject.Connection.Execute "UPDATE T1 SET fld1...."
@Alex