Making a function`s scope global

  • Thread starter Thread starter George Papadopoulos
  • Start date Start date
G

George Papadopoulos

Hello everybody

I have a form which needs to communicate the value of a text box to any
other interested form or report. I have been adviced to create a function
which is supposed to return that value when called from any other form or
report. How do I go about creating the function with a global scope?

thx, in advance

George Papadopoulos
 
Make sure it's in a module, not in the code-behind-a-form, and declare it as
Public.
 
unfortunately that won`t work. The data I need is on a text box of a form. I
need to be able to read that value from within a report. How can I go about
it?

George Papadopoulos
 
Assuming the form's open, the function can refer to it as Forms("name of
form").Controls("name of textbox")
 
Back
Top