How can I pass a Word VBA variable to an ACCESS Query SQL string?

R

Rudy

Hi

I want to use the contents of a variable in a Word VBA
module as a criterion to filter records in an Access
database.
A SQL string however does not accept variables.
Passing the variable to a form in the Access database
seemed like a possible option, but I do not manage to make
it work.
Does anybody have experience with this, or a suggestion
for books that cover this ?

Rudy Tirry
 
W

Word Heretic

G'day "Rudy" <[email protected]>,

pass teh contents of the variable...


SomeSqlCall "A long set prefix" & format(MyVariable) & " some long
suffix"



Rudy said:
Hi

I want to use the contents of a variable in a Word VBA
module as a criterion to filter records in an Access
database.
A SQL string however does not accept variables.
Passing the variable to a form in the Access database
seemed like a possible option, but I do not manage to make
it work.
Does anybody have experience with this, or a suggestion
for books that cover this ?

Rudy Tirry

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Email: (e-mail address removed)
Products: http://www.geocities.com/word_heretic/products.html
Spellbooks: 728 pages of dump left and dropping...

The VBA Beginner's Spellbook: For all VBA users.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top