How to call a Query with Parameters in VBS

G

galsaba

I want to create a function in VBS.
This function will be called from Query A.
I want to send to arguments to this function, and get a result.
so from Query A it will be: MyResult: MyQueryFunction(Arg1, Arg2)

Now in VBS I want to call to Query B, to send these two arguments, and
get the result field that I want, and send it back to Query A.

So in VBS
MyQueryFunction (Weight as Long, Zone as String) As Long

Any help would be greatly appreciatged.

galsaba
 
D

Douglas J. Steele

You cannot call user-defined functions from queries if you're running the
queries from VB Script.. The only time you can have user-defined functions
in queries is if you're running the queries from within Access, not from
outside of Access.
 

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