jeremyhache
Programmer
I set up a macro to run a report in Access when I'm not around, so it needs to open Access, log in as an Admin, and run the macro, then preferably close Access. I wrote a batch file that tries to run the macro, but I'm unsure as to how to input the username and password automatically and the syntax for doing so. Right now the following batch file opens the database and waits for the password, then when I log in it prompts for overwriting the existing file which I press 'Y' to do:
PATH = "C:\Program Files\Microsoft Office\Office\;C:\Windows\Command"
START /WAIT Msaccess.exe "C:\Inetpub\ /x "AutoEndOfDayQCReport"
EXIT
I know there has to be a way to do this with the SendKeys function but I am not proficient at using it and I do not know the correct syntax! Please help!
PATH = "C:\Program Files\Microsoft Office\Office\;C:\Windows\Command"
START /WAIT Msaccess.exe "C:\Inetpub\ /x "AutoEndOfDayQCReport"
EXIT
I know there has to be a way to do this with the SendKeys function but I am not proficient at using it and I do not know the correct syntax! Please help!