• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

Scheduling an Access Macro with a DSN password

I have an Access Macro that I need to schedule to run automatically. When I run it manually the DSN asks for a password. Is there a way I can schedule this Macro to run?
0
Mike Miller
Asked:
Mike Miller
  • 3
  • 3
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
When you created the DSN, did you save the password?

I'm assuming you're working with linked tables - if so, when you created those links, did you tick the box to save the password?

AFAIK, you cannot tell Access to pass in your password via the command line (which is what you're using to run this via the scheduler).
0
 
Mike MillerSoftware EngineerAuthor Commented:
The DSN is for a Progress Database and was created by some 3rd part software on this particular machine. I did try going in the DSN properties and saving the password but there isn't an option to even enter one in. The driver it uses is
MERANT 3.60 32-Bit Progress SQL92v9.1D
When I run the macro, this MERANT SQL92v 9.1D dialog is what is asking for the password.

Yes, the Macro is taking data from a linked table and putting it into a local Access table. I'll try saving the password for the linked tables and see if that works.
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You must delete and re-create the linked table to do this.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Mike MillerSoftware EngineerAuthor Commented:
Ok I re-linked the table saving the pw and was able to run the macro without the prompt. I tried saving the macro as a shortcut and scheduling it that way-no dice. Ideas?
0
 
Mike MillerSoftware EngineerAuthor Commented:
Just created a batch file to run the macro, same result. When I run the batch manually the marco runs fine. It does have 4 prompts within Access though.

When I run the batch (or execute the shortcut mentioned earlier) I can see Access start up in the task manager but it just sits idle. I'm assuming it's waiting for input on the prompts.
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
<It does have 4 prompts within Access though.>

Yes, this would be the issue. Anything you run unattended would have to be fully automated. If any of your process require intervention (or even if the may require intervention from a logic branch or something) you are at risk of this happening.

Unfortunately, the only way to avoid this is to rework your process such that your code doesn't require intervention.

0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now