Converting queries to VB?

JvM

Registered User.
Local time
Today, 23:20
Joined
Jan 7, 2003
Messages
68
Good afternoon,

In my dbase I had some queries I converted to VB. These are queries to add and remove records from tables. I want to execute without asking the yes or no question.

Is this possible?

Greetings...
 
I take it by "convert a query to code" you mean you run it with code?

If so, how's this?

Code:
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryYourQuery"
DoCmd.SetWarnings True
 
The Execute method will also work without warnings
 
If your queries are action queries (which it sounds like they are), the
Currentdb.QueryDefs("nameofquery").Execute
method will not give you any warnings.
 
I could have sworn that's what I said but here's another version of the same method
With CurDB
.Execute SQLStmt
 
Mile-O-Phile tip works like a charm...
I'll have to try the other ones..

But for this moment I'm helped...

Great!

Thank you very much for the efford!
 

Users who are viewing this thread

Back
Top Bottom