OpenForm OpenArgs - multiple arguements

  • Thread starter Thread starter Mark J Kubicki
  • Start date Start date
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
 
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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top