On Open in report

Hiten

Registered User.
Local time
Today, 15:47
Joined
Sep 17, 2001
Messages
51
I have a Report that I want to display certain fields depending on data in a field. ( Visible - true/false )

I have created an if statement

If Me!SizeScaleGrade = 1 Then SizeScaleGrade_A
If Me!SizeScaleGrade = 2 Then SizeScaleGrade_B
If Me!SizeScaleGrade = 3 Then SizeScaleGrade_C
If Me!SizeScaleGrade = 4 Then SizeScaleGrade_D
If Me!SizeScaleGrade = 5 Then SizeScaleGrade_E
If Me!SizeScaleGrade = 6 Then SizeScaleGrade_F
If Me!SizeScaleGrade = 7 Then SizeScaleGrade_G
If Me!SizeScaleGrade = 8 Then SizeScaleGrade_H

I set it to fire on the On Page event but the first record displays all the records then the records after that work fine?

On the On Open event it doesnt even open the report.

Any idea's out there?

H
 
Wrong event, use one of the OnFormat events, having said that had you used a lookup table you wouldn't need any Iifs
 
Lookup Tbale

Sorry a bit new to coding, how do I use a lookup table in a report?
 
Doesn't need any coding, just add it to the query that the report is based on, use the second column to display the actual value you want
 

Users who are viewing this thread

Back
Top Bottom