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!

How to referece field on current report from module

Status
Not open for further replies.

mckenneyj

MIS
Jun 1, 2002
96
I have a report with the field "MemCat" on it
It prints membership dues based on membership category.
The code that calculates the dues is in a module

ex:
Public Function DuesBefore1130() As Currency
Select Case [MemCat]
Case "Active"
DuesBefore1130 = x + y - j
Case "InActive"
DuesBefore1130 = x + y - j + 50
Case "etc..."
foo
End Select
End Function

In this case [MemCat] is on the current record of the recordset of the current report.

so how do I have the code above reference the current record of the current reports recordset as I may want to use this module to refernce any report that may be open


Thanks,
John McKenney
Work Hard... Play Harder
 
Why not passing the MemCat value as an argument to the function ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
so how would I do that

Thanks,
John McKenney
Work Hard... Play Harder
 
How and where is your function actually called ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
sorry blonde moment
passed the name of the report in with the function and all works fine

please close this thread

Thanks,
John McKenney
Work Hard... Play Harder
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top