Importing an append table query

adj

Registered User.
Local time
Today, 18:54
Joined
May 23, 2000
Messages
14
I am wanting to import an append table qurey into VBAso that I can set the parameter without having to pass the parameter in the form. Is there a way to break up the query into smaller pieces to see it and be able to read it. Thanks.
Anne
 
Just switch to SQL-screen. There you find your query as SQL-string. Copy this to any VBA-module. Then you can (easily?!..) change your query like this:

sub test(lngSearchValue as Long)
DIM SQL as string

SQL="CREATE... "
SQL=SQL & "WHERE ThisValue=" & lngSearchValue & ";"

DoCmd.RunSQL SQL

end sub
 

Users who are viewing this thread

Back
Top Bottom