run query

Gruung

Registered User.
Local time
Today, 14:14
Joined
Nov 25, 2003
Messages
35
Hi,
this is just a quick question, i have a command button and i want to run a delete query then an update query, whats the code that i need to input to execute a query? Also how do you make a message box appear that asks you if you are sure that you want to run this query? thanks
 
If the query is stored already then:

DoCmd.OpenQuery "MyQuery"

If it's created in SQL

DoCmd.RunSQL "SELECT * FROM etc....."
 
thanks works
 

Users who are viewing this thread

Back
Top Bottom