--- Wilhelm Graiss <Wilhelm.Graiss@bal.bmlfuw.gv.at>
wrote:
> Hello,
>
> We have a question concerning the vba-code which is
> posted on
>
http://gborg.postgresql.org/project/psqlodbc/genpage.php?howto-accessvba:
>
> We have a function in postgres (Version 7.3.2) and
> would like to call it
> from vba on Access 2002 (a.k.a XP) with different
> parameters each time.
>
> We searched the Net and played with the code, but
> with no success. The
> connection to postgres works, the problem is how to
> trigger the "select
> myfunction(param1, param2, param3)" - thing from
> vba...
You need to do a passthrough query. Just supplying a
connection string for your querydef will cause the SQL
to be sent directly to the server, instead of to Jet.
So all you need then is to capture the parameters
according to your preference, construct your query
string and use it to set your sql property.
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree