VBA - Automatic ODBC Logon

J

Jason Gyetko

I'm opening a report from within a module (Access 2000). This report calls
a query which is getting data from an ODBC datasource. How can I
programmically logon to this datasource so that I do not get prompted for a
password every time the database is opened? Thanks.
 
A

Ann M.

Jason Gyetko said:
I'm opening a report from within a module (Access 2000). This report calls
a query which is getting data from an ODBC datasource. How can I
programmically logon to this datasource so that I do not get prompted for a
password every time the database is opened? Thanks.
We had a similar issue with our application, Access 2000 front end, SQL
Server 2000 back end.
We have a table in the front end that stores the connection information -
database name, name of DSN, User ID, and password.
This information is used to connect the SQL Server database tables
initially - the first time the front end is run on a workstation.
Then each time the front end is opened, code runs to disconnect one of the
linked tables and then reconnect it using the same connection information.
Once the connection is reestablished for one table, it is open for all of
the linked tables.
Hope this helps.
 

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