passing value from a form

B

bob

I have a form with a string value that is equal to its
name. It has a find button that opens another form that
automatically calls a stored procedure. The procedure has
a variable name equal to the string in the first form. I
need to be able to pass it through the second form. I have
tried creating a hidden field on the second form and
setting its value to the first forms string. But had no
luck.
 
G

Graham R Seach

Bob,

You can do it in one of two ways.

1. Pass it as an OpenArg in the OpenForm method.
DoCmd.OpenForm "frmMyForm", , , , , , strMyValue

2. You can use OO techniques to pass the value to a property. Examine the
code here:
http://www.pacificdb.com.au/MVP/Code/MyDialog.htm

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 

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

Top