passing variables between forms

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

Guest

Hi,
I want to access a variable that i've declared in the declaration section of another form from the main form.
what is the easiest way to do it?
the line of code looks like this:
While Form!frmSeason!commandClicked = False
but it's giving me object not defined error

thanks for the help in advance
 
Try declaring a public variable in a database-level module
instead of within the form module. That way, you can
access its value from anywhere in the program.

If you don't have a module in your database already,
create one. Type something like the following in the
Declarations section (the very top of the module):

Public blnSeason As Boolean

That's it. Now, you just need to assign the value:

blnSeason=Form!frmSeason!commandClicked

The revised statement would read

While blnSeason = False

-----Original Message-----
Hi,
I want to access a variable that i've declared in the
declaration section of another form from the main form.
 
Back
Top