473,387 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to run a scheduled AutoExec Macro that requires an ODBC password

27
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?
Aug 24 '09 #1
4 4543
ck9663
2,878 Expert 2GB
Can you use a saved DSN? Or why not use a trusted connection instead?

Good luck.

--- CK
Aug 24 '09 #2
kini113
27
I can't figure out how to save a System DSN password. How would I do a trusted connection?

Thanks
Cindy
Aug 25 '09 #3
ck9663
2,878 Expert 2GB
Build your connection string. Here, read this

Good luck!

--- CK
Aug 25 '09 #4
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,
dbro
Aug 25 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: MLH | last post by:
My autoexec macro in an Access 2.0 database has 2 lines. The first runs DoMenuItem - Database - Window - Hide. The second lines is Runcode - Initialize(). Initialize is a procedure in a global...
4
by: mvivar | last post by:
Hi everybody: This will be not easy to explain as my mother language is not english, so my apologies in advance if it sounds confusing. We have a database access 97 wich controls time of...
5
by: MLH | last post by:
I have problems getting the CTRL-d, CTRL-w and other 'hotkey combo' assignments to work in Access 97. I just imported the autoexec macro directly from Access 2.0, so its no surprise. Some are...
6
by: MLH | last post by:
Did A97, perchance, do away with the need for an AutoExec macro to initiate an autoexec sequence for databases? Or, must we still suffer with that hideous macro?
6
by: Takeadoe | last post by:
Dear NG, Can someone assist me with writing the little code that is needed to run an update table query each time the database is opened? From what I've been able to glean from this group, the...
2
by: dstorms | last post by:
Something very strange going on here! Don't know where dstorms original post went! The post, in essence, stated that his form, containing a checkbox and a textbox, opened fine if opened...
8
by: kini113 | last post by:
I want to update my 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...
4
by: kini113 | last post by:
I have 2 AutoExec macro's that run at a specified time every morning (1am) but 1 of those macros can't be run more then 1 time a day. I found a set up on a previous post that almost solves my...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.