troubleshooting Question

Need help reading a command line parameter in MS Access MDE

Avatar of pcalabria
pcalabriaFlag for United States of America asked on
Microsoft Access
7 Comments1 Solution128 ViewsLast Modified:
I need help getting command line parameters working with MS Access mde files.

When I use a batch file to start MS Access using the /cmd switch all works fine when I start the mdb... however, when I compile the program the mde does not work.

The code I execute to read the parameter is:
strCommand=Command()

This is the line I use in the BAT file to start and test the MDB. Everything works fine.
"C:\Program Files\Microsoft Office\Office\MSAccess.exe" "c:\disti-master\database\Inventory_Program.mdb" /cmd start MAT

Once compiled to an MDE I tired adding this line to the BAT file.  This line does not work.  It does not return an error, it simply does not read the command line parameter.

"c:\disti-master\database\Inventory_Program.mde" /cmd start MAT

I also tried:

"c:\disti-master\database\Inventory_Program.mde" /cmd "start MAT"

Please help by providing me with a way to have access read the command line parameter "start MAT" when the mde is executed.

Thanks
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros