From: jmillerWV on
Hello again all,
Have a SQL backend, and an Access2003 front end. When I run a passthrough
query I get the "Select Data Source" dialogue box. Is there a way to send
info along wiht the command to run the query to choose the data source
without user intervention? code I am using now:

Dim stQry1 as string
stQry1 = "MyPassthroughQuery"
docmd.OpenQuery stQry1

Simple I know but it works to run the query.

Thanks in advance for any assistance.
From: MGFoster on
jmillerWV wrote:
> Hello again all,
> Have a SQL backend, and an Access2003 front end. When I run a passthrough
> query I get the "Select Data Source" dialogue box. Is there a way to send
> info along wiht the command to run the query to choose the data source
> without user intervention? code I am using now:
>
> Dim stQry1 as string
> stQry1 = "MyPassthroughQuery"
> docmd.OpenQuery stQry1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You query needs the correct Connect string w/ userid and password, if
necessary. If you don't want to set up a DSN you can use a DSN-less
connect string. See this site for connection strings to various DB
engines:

http://www.connectionstrings.com/

HTH,
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBSqmVvoechKqOuFEgEQKzrACg1ywjUV7MXBYDrezySHYL1IZGkOEAoNxM
9UZaClU3IgFWW3P9FzBMVJf2
=MznA
-----END PGP SIGNATURE-----