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

Using Task Scheduler with a secured database

Status
Not open for further replies.

JustLJ

MIS
Oct 15, 2002
70
US
Greetings.

Looking for some help with automagically running a macro in an MSAcess database using the Task Scheduler. I've found the other threads here describing the process and they are a wonderful help, but I still have a sticky wicket.

Mainly thus: The database has a database password assigned to it, (done from the Tools|Security menu item). This is done immediately upon opening and has nothing to do with a form. This occurs before any VBA code could be executed. I've tried having the password part of the calling command line in TS (/pwd password /x macroname) and that doesn't work -- in fact, all it does is bring up a box asking for the username and leaving the password blank.

So, my question to you wonderful folks is this: Anyone have a solution for opening a secured database from a scheduled task?

Thanks for the help!
LJ

 
Hey LJ:

Have you tried creating a shortcut to your database and using your startup switches there? For example, I had to create a shortcut to a database for a de-compile (long story all), and I changed the target to something like this:
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" L:\PAGERS.mdb /decompile.

I think it'll work for you if you create a short cut to your database and set your target similar to the way I have done it, using the /pwd and /x switches instead of the /decompile switch.

If you need further assistance, the Access help files for command-line options are a pretty good place to look also.

HTH

Greg If you don't understand, just nod and smile ...
 
Thank Greg,

However, I get the same result. However, I'm going to try this on a test database from my personal machine. Maybe there is some config issue over our network.

I appreciate the reply!

Have a good one.
LJ
 
quick question... You said befor that there is a database password... then later you said a window came up asking for a user name and password.

Did you add just a database password, or did you enable user level security??

If you added user level security, then you'll need to specify a user name in the command line as well...

--James
junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
Hey James.

There's always been a password on this database - the normal standard "Password Required" box comes up and then the entry line after "Enter database password".

What I get when I try from task scheduler, I get a "Logon" box with my first name in it and waiting for a password. I've tried my usual scheme of passwords on this, and none of them work. P.S., the name that comes up is not my userid, computer name or anything along that route. It's only my first name.

So, in following your question and looking at the database, there does seem to be a matching entry in the User and Group Permissions box for me (also an Admin, which it says is logged in at the moment). So, how do I remove all of that U&G Permissions stuff without wrecking my whole database?
Thanks again to all!
LJ
 
the second question i don't know about... but with tring to use the login box when it comes up from the task sceduler. Try using the user name
Admin
and the typical password you use for accessing the db...

Let us know how that works out for you.

--James
junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top