Passing an Access parameter from shortcut or command line

A

Andy Boruta

I would like to get a parameter from a shortcut (e.g command line "switch"
style), and use that parameter to determine which data to display in my
database. What is the syntax for the command line, and the code to retrieve
it.
 
A

Andy Boruta

Online help states that the command function is not available in office
applications (Command Function - Visual Basic for Application). The help
topic for "Command Function" returns a 404 error. Is there another place I
can research the topic?
 
A

Alex Dybenko

here from help of access 97:

Command()

Returns the argument portion of the command line used to launch Microsoft
Visual Basic or an executable program developed with Visual Basic.

Syntax

Command

Remarks

When Visual Basic is launched from the command line, any portion of the
command line that follows /cmd is passed to the program as the command-line
argument. In the following example, cmdlineargs represents the argument
information returned by the Command function.

VB /cmd cmdlineargs

For applications developed with Visual Basic and compiled to an .exe file,
Command returns any arguments that appear after the name of the application
on the command line. For example:

MyApp cmdlineargs

To find how command line arguments can be changed in the user interface of
the application you're using, search Help for "command line arguments."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top