Report not seeing control value

Meltdown

Registered User.
Local time
Today, 13:15
Joined
Feb 25, 2002
Messages
472
Hi all,

Ona report, I have a column in a query called 'ReportLineNums'. I've dropped the column onto the report and the value is being printed to the report. However, I can't seem to reference the value in the control. I keep getting an "You entered an expression that has no value error"...anyone know what that is?

I've debugged and it's stopping on the first line of my IF statement.

I've double-checked the control name as well, I've set the control data type to True/False, nothing seems to work?

If Me!ReportLineNums.Value = False Then
Me!txtLineNums.Visible = False
End If
 
Okay, first of all where are you attempting to use this code?
 
Hi Bob,

I've tried all three events, Open, Load and Activate, they all return the same error, yet I can see the value on my report.

Regards
Melt
 
Hi Bob,

I've tried all three events, Open, Load and Activate, they all return the same error, yet I can see the value on my report.

Regards
Melt

So, you've tried none of the correct ones. :D

The correct event would be the ON FORMAT event of the SECTION that the controls are in. If you are using 2007 or 2010 then you might want to create a function in the report module and then just call it from the On Format and the On Paint events. The On Paint event handles things like the On Format but for the newer Report View where the On Format handles the print preview and printing.
 
Doh!, thanks a lot Bob...must be really losing it.:confused:

Regards
Melt
 
Doh!, thanks a lot Bob...must be really losing it.:confused:

Regards
Melt
No worries. There's a LOT of things to try to remember about Access.

smiley.jpg
 

Users who are viewing this thread

Back
Top Bottom