M
mattc66 via AccessMonster.com
I have the below code on one of my reports. The first "IF" statement fails to
work if my me.Brand = Amerec. However if it's any of my other If ...me.Brands
below the IF..Me.QuoteExp will work fine.
Can anyone explain why?
Private Sub PageHeader0_Format(Cancel As Integer, FormatCount As Integer)
'The below IF only works if me.brand is NOT AMEREC..
If IsNull(Me.QuoteExp) Then
lblPriceQuote.Visible = False
ElseIf Me.QuoteExp > 0 Then
lblPriceQuote.Visible = True
End If
If Me.Brand = "AMEREC" Then
rptALogo.Visible = True
rptFLogo.Visible = False
rptHLogo.Visible = False
rptPLogo.Visible = False
rptSLogo.Visible = False
ElseIf Me.Brand = "FINNLEO" Then
rptFLogo.Visible = True
rptALogo.Visible = False
rptHLogo.Visible = False
rptPLogo.Visible = False
rptSLogo.Visible = False
ElseIf Me.Brand = "HELO" Then
rptFLogo.Visible = False
rptALogo.Visible = False
rptHLogo.Visible = True
rptPLogo.Visible = False
rptSLogo.Visible = False
ElseIf Me.Brand = "POLAR" Then
rptFLogo.Visible = False
rptALogo.Visible = False
rptHLogo.Visible = False
rptPLogo.Visible = True
rptSLogo.Visible = False
ElseIf Me.Brand = "OEM" Then
rptFLogo.Visible = False
rptALogo.Visible = False
rptHLogo.Visible = False
rptPLogo.Visible = False
rptSLogo.Visible = True
ElseIf Me.Brand = "MCCOY" Then
rptFLogo.Visible = False
rptALogo.Visible = False
rptHLogo.Visible = False
rptPLogo.Visible = False
rptSLogo.Visible = True
End If
End Sub
work if my me.Brand = Amerec. However if it's any of my other If ...me.Brands
below the IF..Me.QuoteExp will work fine.
Can anyone explain why?
Private Sub PageHeader0_Format(Cancel As Integer, FormatCount As Integer)
'The below IF only works if me.brand is NOT AMEREC..
If IsNull(Me.QuoteExp) Then
lblPriceQuote.Visible = False
ElseIf Me.QuoteExp > 0 Then
lblPriceQuote.Visible = True
End If
If Me.Brand = "AMEREC" Then
rptALogo.Visible = True
rptFLogo.Visible = False
rptHLogo.Visible = False
rptPLogo.Visible = False
rptSLogo.Visible = False
ElseIf Me.Brand = "FINNLEO" Then
rptFLogo.Visible = True
rptALogo.Visible = False
rptHLogo.Visible = False
rptPLogo.Visible = False
rptSLogo.Visible = False
ElseIf Me.Brand = "HELO" Then
rptFLogo.Visible = False
rptALogo.Visible = False
rptHLogo.Visible = True
rptPLogo.Visible = False
rptSLogo.Visible = False
ElseIf Me.Brand = "POLAR" Then
rptFLogo.Visible = False
rptALogo.Visible = False
rptHLogo.Visible = False
rptPLogo.Visible = True
rptSLogo.Visible = False
ElseIf Me.Brand = "OEM" Then
rptFLogo.Visible = False
rptALogo.Visible = False
rptHLogo.Visible = False
rptPLogo.Visible = False
rptSLogo.Visible = True
ElseIf Me.Brand = "MCCOY" Then
rptFLogo.Visible = False
rptALogo.Visible = False
rptHLogo.Visible = False
rptPLogo.Visible = False
rptSLogo.Visible = True
End If
End Sub