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
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