OpenForm OpenArgs - multiple arguements

M

Mark J Kubicki

I need to pass several values to a form

what is the proper delimitation for setting the value of multiple
arguments?

the values are:
string:"true",
and
2 field values on the current form (which opens the second):
me.Manufacturer.value, and me.CatalogueNo.value

thanks in advance,
mark
 
R

Rick Brandt

Mark said:
I need to pass several values to a form

what is the proper delimitation for setting the value of multiple
arguments?

the values are:
string:"true",
and
2 field values on the current form (which opens the second):
me.Manufacturer.value, and me.CatalogueNo.value

thanks in advance,
mark

Since you will have to write the code to parse the values apart in the form
being opened then you can delimit them any way you like. I like to use tildas
(~) because they are very unlikely to ever show up in the real data.
 
F

fredg

I need to pass several values to a form

what is the proper delimitation for setting the value of multiple
arguments?

the values are:
string:"true",
and
2 field values on the current form (which opens the second):
me.Manufacturer.value, and me.CatalogueNo.value

thanks in advance,
mark

The OpenArgs argument is a string.
You can separate the various inner strings using any character
(hopefully, not a character that might be found in an inner string).
I've used the comma as a separator below. You could also, for example,
use the pipe (|) character.

You wish to pass the word "True" as a string and not True as an Access
constant number (-1), is that correct?

DoCmd.OpenForm "FormName", , , , , , "True" & "," & Me![Manufacturer]
& "," & Me![CatalogueNo]

This will pass to the second form like this:
True,Lockheed,123

In the second form's Load event, you would parse the openargs into
it's 3 inner strings. If you need help with that, post back.
 
Top