I want to update my MS Access database every night at 10pm. I have a Macro that runs all of the queries needed to update the database (which is also saved as a VBA module) and an AutoExec Macro to runs the "Update Inventory" macro. I also scheduled the task to run every night a 10pm. The problem i have is that in order to run the "Update Inventory" macro I have to enter my ODBC password and there is no way to save the password. This there a Macro action or VBA code I could add that would enter my password automatically?
How to run a scheduled AutoExec Macro that requires an ODBC password
Collapse
X
-
If you are using passthrough queries in your Macro, you should be able to:
- open the PT query in Design View
- then click properties
- then click the build button at the end of the line that says "ODBC Connect Str" ( it will look like [...] )
Once you click that button, it will ask for your ODBC connection, choose it and it should open a box that will allow you to enter your password. Enter your password and it will test the connection, then it will ask if you want to save the password in the connection string. Choose yes and this should solve the problem.
Hope this helps,
dbroComment
Comment