Making a function`s scope global

  • Thread starter George Papadopoulos
  • 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
 
D

Douglas J. Steele

Make sure it's in a module, not in the code-behind-a-form, and declare it as
Public.
 
G

George Papadopoulos

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
 
D

Douglas J. Steele

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top