Command line param to query

  • Thread starter Thread starter Peter Ivers
  • Start date Start date
P

Peter Ivers

I need to pass three command line parameters to a report,
and have it use these as criterea on the query. I see how
to use the COMMAND function to reference the /CMD
parameter, however I have two questions:
1. Is there a way to parse out multiple values
e.g. /CMD "Key1,Key2,Key3"?
2. Is there a way to dynamically set these values as
criterea in the report, for example to set the criterea
for PersonID to Key2?
- Pete
 
Hi,

1. Specify the name of some myfile.ini, extract the information stored
in that file through the appropriate API, or through file scanning, with VBA
code.

2. Instead of a dumb parameter, use a VBA user defined function:

Public Function MyParam1( ) As Long
... ' do something as easy or potentially as complex as you want
MyParam1= ...
End Function

and in the query supporting the report, use MyParam1( )




Hoping it may help,
Vanderghast, Access MVP
 
Back
Top