Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OpenArgs...

Status
Not open for further replies.

sabavno

Programmer
Jul 25, 2002
381
CA
I am wondering if I could pass two parameters using OpenArgs

Or how else could I pass two parameters to another form?

Thanks.
 
Hi!

You do have a couple of options.

First, you can concatenate a string and then parse it in the new form:

strArgs = FirstThing & ";" & SecondThing

To parse FirstThing = Left(Me.OpenArgs, Instr(Me.OpenArgs, ";") - 1)
SecondThing = Mid(Me.OpenArgs, Instr(Me.OpenArgs, ";") + 1)

Secondly, you could simply leave the first form open and reference the appropriate text boxes using:

Forms!YourForm!YourTextBox.Value

hth
Jeff Bridgham
bridgham@purdue.edu
 
Well the string you pass can be anything you want, so you could pass a string with a delimiter in it and then parse in once it gets to the form.

Or you could open the form and then run more code after it's open, in the calling procedure, where you would still have access to all the variables you would need.

Or you could use global variables.

Or you could stick your parameters in (hidden, if you want) controls on the calling form, so that code in the called form's on load or on open event woudl have access to those data.

But no, you can't pass more than one openArgs parameter!

Hope this helps.

Jeremy =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developer's section of the site for some helpful fundamentals.


Remember to reward helpful tips with the stars they deserve.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top