running mdb from the command line
Posted on 2003-12-12
I need to be able to open my .mdb file automatically (- via scheduled task or autosys etc.) - in order for a call to be made to an 'initialise data' function which is called from the start-up 'autoexec' macro.
This purpose of this is to prevent users from having to explicitly perform this during holiday periods etc., and so that the database contains daily details...
The problem is that I need to suppress update confirmation msg's when rows are updated etc against tables - as this will be initiated from a command line by a scheduled task
- i.e. " myData.mdb/excl"
I can use "DoCmd.SetWarnings False" which works fine when I double-click to open the .mdb, though as soon as I try to open it from the command prompt I get an error along the line of:
"There was a problem sending the command to the program."
"Windows cannot find the file myData.mdb....."
- so it seems to be a problem calling from command line.
Does any know how to overcome this problem?
(btw I have also tried to use db.Execute strSQL rather than DoCmd.RunSql - though this doesn't overcome the problem..
Any help would be grately appreciated