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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report filter and global vars

Status
Not open for further replies.

jeffmoore

Programmer
Aug 29, 2003
301
US
This is sort of a continuation of my last post...
I'm trying to filter a report that is being outputed by the sendto comand.
So in my report, in the properties, where it says FILTER, I type in my filter:
[HoldNum]=PassHoldNum

PassHoldNum is a global variable and works for ALL my other forms and such.
Except in this case...
when I have my code open the report I get the "parameter msgbox" asking for a value for PassHoldNum.
Yet if i step thur the code ... PassHoldNum is there with a value that happens to be 5.

the code is listed in my last post, here is link:
thread705-690989
 
When I have problems like this I usually create a function that returns the current value of the global rather than using the global itself. Create a function:



Public Function GetSomeGlobalValue() as string

GetSomeGlobalValue=PassHoldNum

End function
Then your filter would be:
[HoldNum]=GetSomeGlobalValue()

You didn't say where the value of the global is being set, but it should be in the same module as this function.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top