Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Variable From 1 Report To Another

Status
Not open for further replies.

FontanaS

Programmer
May 1, 2001
357
US
Hi!

I have a variable in report 1 that I store -
The user clicks on a hyperlink, and i store the value the user clicked on in a variable (var1).

Then another report is called and opened and I get records from the database based on that varaible (var1).

For some reason, when report 2 opens, I lose the value in the variable. How do i get that variable ?

I was trying to look up how to declare global variables to see if that would help.

Right now i have this code
strDocIdGrantNumber = Frm!Frm_Center_Summary_Grant_Totals.Text33

where text33 is the value i need.

THANKS
 
Hey,
Your idea of declaring a global would work fine,

Global VariableName as String

Create this in a Module, and then the module will run as soon as a form or report is running and then you can use the variable in any report or form.

Hope this helps

Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top