Passing Params

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi al

I have a form which uses a param query (pop up a window to ask for the value when run the query), but when open this form, I want to pass the value of this parameter (call param1) in VB code to avoid popping up a param window, how do I do this. I use OpenForm method to open the form from another for

DoCmd.OpenForm formname

Thanks
 
Wait, you may have an issue if Para1 is not visible to the module

if you Dimensioned the variable Param1 in the sub on the form, you'll have to make it a PUBLIC variable

remove the "Dim Param1 as string" from your sub, and at the top of the MODULE you put the Function in, add

Public Param1 as strin

right under the
Option Compare Databas
Option Explici

that VB puts there for you

that should do i
bl
 
Back
Top