Can someone tell me what is wrong with this code?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
‘If Me!DirCount < 3 Then
If Reports![rptYPPA Order Form]!DirCount < 3 Then
Reports![rptYPPA Order Form]![sbrptYPPADirOrderDetails].Visible
= True
Reports![rptYPPA Order
Form]![sbrptYPPADirOrderDetailsWHITEOUT].Visible = False
Else
Reports![rptYPPA Order Form]![sbrptYPPADirOrderDetails].Visible
= False
Reports![rptYPPA Order
Form]![sbrptYPPADirOrderDetailsWHITEOUT].Visible = True
End If
End Sub
I get no error messages, but it isn't making what I want visible when I
want it. When I step through it, I notice that it goes from the If
statement directly to Else. To me, that means it must be evaluating it
as false. But it's true. The record it is looking at has a DirCount of
2. It is showing up in the supporting query. You can see I commented
out my first reference to the DirCount. I've been experimenting
thinking that I've just got a syntax problem. Please post if you
see anything suspicious or need more information to evaluate it. Thanks
everyone.