Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking to an ODBC Source

Status
Not open for further replies.

Krukloaf

Programmer
Jun 28, 2002
9
US
Hello,
I'm trying to use DLookup() in my VBA code to access an ODBC table. When I run the code, it pauses and manually asks me for a user name and password. Is there any way to automate this?

Thanks,
Mike
 
Only way I've found is to opt for the password to be saved when you link the table to your database.
 
That's fine with me because only I modify the code, but what is the actual VBA code to do this?
 
Not done in VBA, but at point of initially attaching table to your database,


File, Get External Data, Link Table, then selct table from source and list. In the dialogue box containing list of tables, check the small box in the bottom right hand corner to save the password for the link.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top