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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh ODBC Connect String???

Status
Not open for further replies.

gnt

Technical User
Aug 15, 2002
94
US
I asked this question on the query forum but had no takers. Maybe someone here can help...

Once I connect to my external database (pass through query), the uid and pwd stays the same no matter what I put in the ODBC Connect String field in the properties box.

For example, I have 2 pt queries, one with uid=rb;pwd=rb and the other with uid=atl;pwd=atl. They are supposed to pull different data - but if I open up the 'rb' query first, then they both pull 'rb' data. Vice-versa if I open the 'atl' query first. I have to close and re-open Access in order to pull the other data. I have tried a DSN-less connection thinking that might be the problem, but I can't seem to get that to work either.

The only way to pull the correct data is to manually enter the DSN, UID and PWD every time - but I don't want my users messing around with that.

Is there a way to somehow refresh/close the connection in vba?

Any advice would be greatly appreciated!
Thanks-
Nate
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top