display values in a MS ACCESS 2000 combo box from sql server table

P

Prudhvi Reddy

Hi guys
I am trying to display values in a combo box from running a query on a sql
server table.
In other words connecting Access Front End to SQL server database.

I know the query but where should I mention the connection string ??
How does Access know which sql server it has to connect?

Any help is appreciated.

Thanks
Reddy
 
M

MGFoster

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

Are you using and .adp or .mdb file?

ADP:
The ComboBox will "know" to use a table/view/stored procedure using the
CurrentProject's connection string.

MDB:
The ODBC Pass Through QueryDef's ODBC Connect Str property should have
the correct connection string. You will have to put that in yourself,
either manually or programmatically.

I like DSN-less connection strings. E.g. (all one line):

ODBC;DRIVER={SQL
Server};SERVER=MyServerName;DATABASE=MyDatabaseName;TRUSTED_CONNECTION=
Yes

Trusted_Connection means using NT Logon Authentication on the SQL
server.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

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

iQA/AwUBQUIWc4echKqOuFEgEQIB7wCfUh9N6Uhn6kBL4R5/JP9P34Z8qKcAoKOe
nW72KNT7xpMJKq4l20RQvKsO
=AgVb
-----END PGP SIGNATURE-----
 

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