bill201
asked on
how to make a condition in a report in access 2010 not to show a field
hi
i want to make a condition in access that if a field is equal zero not to show it in a the printable report
i put in the event current report this code:
if not retail >0 then
retail.visiable=false
end if
but it's not worked and the field is visiable anywah
i want to make a condition in access that if a field is equal zero not to show it in a the printable report
i put in the event current report this code:
if not retail >0 then
retail.visiable=false
end if
but it's not worked and the field is visiable anywah
ASKER
it's not working but actually i don't paste the entire code and maybe is this matter
this is my entire code includet what i try to do do accordingly you comment :
Private Sub detail_format(Cancel As Integer, FormatCount As Integer)
Dim d As String
d = Nz(DSum("retail", "orderdetailst", "orderid=" & Me.OrderID), 0)
If Not d > 0 Then
Me.[Retail].Visible = Not d > 0
End If
End Sub
and the dsum worked (i tried bfore)
this is my entire code includet what i try to do do accordingly you comment :
Private Sub detail_format(Cancel As Integer, FormatCount As Integer)
Dim d As String
d = Nz(DSum("retail", "orderdetailst", "orderid=" & Me.OrderID), 0)
If Not d > 0 Then
Me.[Retail].Visible = Not d > 0
End If
End Sub
and the dsum worked (i tried bfore)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
private sub detail_format(Cancel As Integer, FormatCount As Integer)
me.[retail].visible= not me.[retail]>0
end sub