HEEEELP!!!!

Milan

Registered User.
Local time
Today, 00:08
Joined
Feb 17, 2002
Messages
85
HOW DO I RUN A SQL STATEMENT IN VB?. DO I USE THE QUERYDEF STATEMENT. CAN ANYBODY SEND ME AN EXAMPLE.


MANY THANKS

MILAN
 
DoCmd.RunSQL("DELETE * FROM tblBlah WHERE Blah = Blah")

is one way to do it. (VBA)

In VB...

Use the execute method of the connection...

Dim cn as connection
Set cn = [Some connection string]

with cn
.execute("DELETE * FROM tblBlah WHERE Blah = Blah")
end with

[This message has been edited by scottfarcus (edited 04-10-2002).]
 

Users who are viewing this thread

Back
Top Bottom