why can't "public txtWrk_From as string" be found in another modu.

  • Thread starter Thread starter Eagleman
  • Start date Start date
E

Eagleman

using Access 2007 trial, I have declared

public txtWrk_From as string

in the GENERAL area of a form and I expect to use access that variable in
another form as

me![From] = txtWrk_From

me![from] is a text table item

I thought scope of "public" declared items was the entire project.

John P
 
Eagleman said:
using Access 2007 trial, I have declared

public txtWrk_From as string

in the GENERAL area of a form and I expect to use access that variable in
another form as

me![From] = txtWrk_From

me![from] is a text table item

I thought scope of "public" declared items was the entire project.


That's true for standard modules. For class modules,
including form/report modules, A module level Public
variable is a property of the class. That means you need to
use the syntax:

Me![From] = Forms!theform.txtWrk_From
 
Back
Top