View Full Version : On Open in report


Hiten
05-03-2006, 06:17 PM
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

Rich
05-04-2006, 12:06 AM
Wrong event, use one of the OnFormat events, having said that had you used a lookup table you wouldn't need any Iifs

Hiten
05-04-2006, 12:15 AM
Sorry a bit new to coding, how do I use a lookup table in a report?

Rich
05-04-2006, 11:01 AM
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