passing value from a form

  • Thread starter Thread starter bob
  • Start date Start date
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.
 
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
 
Back
Top