OpenArgs in OpenForm macro

  • Thread starter Thread starter George Stevenson
  • Start date Start date
G

George Stevenson

I'd like to pass some OpenArgs to a form when it opens. I'm opening it from
a Macro using the OpenForm command in the macro. I can't see where to put
the OpenArgs values in the Macro def area. Can someone spell it out for me?
 
George

If you'll describe a bit more what you are trying to accomplish with this
technique ("pass some OpenArgs to a form"), the newsgroup readers may be
able to offer alternate approaches.

For example, it is possible for a form in Access to "look up" values from
another form.

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 
I have a form that can be called both from another form and from a macro.
When I call it from a macro, I'm using a filter to pass a set of records
that are processed by the form. When I do that, I want to create an IE7
object that reads records from an external database and presents them in the
form with the URL?ID= xxx stored in the Access database record. I'd like to
pass an OpenArgs parameter called SuppressIE=False

When I'm displaying the form from another form, it is for a single record,
and I don't need the IE7 object, I'd pass OpenArgs as SuppressIE=True

I don't see where to put the OpenArgs parameter when calling the form from a
Macro with OpenForm macro command.
 
George,

Sorry, the OpenForm macro action does not support an OpenArgs argument.

You can use a SetValue action in the macro, following the OpenForm
action, to pass the value you want to the OpenArgs property of the Form.

Another approach, if you are using Access 2007, is to use a SetTempVar
argument to create a variable that the form could use for the purpose
you described.

Alternatively you can use a VBA procedure instead of a macro to automate
the opening of the form.
 
Thanks, thats what I needed to know.


Steve Schapel said:
George,

Sorry, the OpenForm macro action does not support an OpenArgs argument.

You can use a SetValue action in the macro, following the OpenForm action,
to pass the value you want to the OpenArgs property of the Form.

Another approach, if you are using Access 2007, is to use a SetTempVar
argument to create a variable that the form could use for the purpose you
described.

Alternatively you can use a VBA procedure instead of a macro to automate
the opening of the form.
 
Thanks, that's what I needed to know.

Steve Schapel said:
George,

Sorry, the OpenForm macro action does not support an OpenArgs argument.

You can use a SetValue action in the macro, following the OpenForm action,
to pass the value you want to the OpenArgs property of the Form.

Another approach, if you are using Access 2007, is to use a SetTempVar
argument to create a variable that the form could use for the purpose you
described.

Alternatively you can use a VBA procedure instead of a macro to automate
the opening of the form.
 
Back
Top