Sending more than 1 argument to a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have a form to which I want to send through the openArgs a few arguments
of different types. is that possible? If no, is there another way sending a
few arguments to a form when opened (excpet for using global variables of
course...)?
Thanks,
 
Yes. you can using the open args that contain a seperator between the Two
Values

For example I use the "-" as a seperator

MyOpenArgs = Param1 & "-" & Param2
docmd.OpenForm "FormName",,,,,,MyOpenArgs
========================================
On the OnLoad event of the form you can split the Openargs

Split(Me.OpenArgs,"-")(0)
will return Param1

Split(Me.OpenArgs,"-")(1)
will return Param2
 
Back
Top