Command line help

  • Thread starter Thread starter JOE
  • Start date Start date
Hi Joe,
How about this ?
stDocName = "Name of Form"
DoCmd.OpenForm stDocName
Céline
 
JOE said:
Does anyone know the command line syntax to open a form in
an Access DB?


Normally you would specify the form as the Startup Form
(Tools - Startup).

If you want to be able to open different forms from the
command line, you'll have to create a macro for each form.
Each macro's only action would be to open its corresponding
form. Then you can specify which macro to run at startup by
using the /X macroname command line option.
 
Yes this works fine when you are in the Access DB creating
code in the event of a form. I am looking for the DOS
command line to open a form from outside the DB.

Thanks again for the help.

Joe
 
I am trying to open a form from outside of Access.

I have a trigger on an SQL table that I want to add the
DOS command line to open the DB and the form.

Thanks for the help.

Joe
 
JOE said:
I am trying to open a form from outside of Access.

I have a trigger on an SQL table that I want to add the
DOS command line to open the DB and the form.


Yes, I understood that.

Assuming you have a macro named OpenMyForm that opens form
MyForm, then the command line would be:
"path to ms access" "path to your mdb file" /X OpenMyForm

If you're trying to find a way to do this without changing
the mdb file, I think you're out of luck.

BTW, it won't answer your question, but you can create a
desktop shortcut to a form by just dragging the form object
from the database window to the desktop.
 
Back
Top