IIF Label Assistance

Listerman

Registered User.
Local time
Today, 11:09
Joined
Mar 3, 2008
Messages
19
Basically I have a report pulling individuals average talk times on a phone.

Depending on their time we associate a Rating.

On Report_Open I was trying to set a
IIF ([AvgTT] > "85"), AvgTTlbl.caption = "Exceeded", AvgTTlbl.caption = "Partially Exceeded"

According to the AvgTT properties its a textbox but you can use AvgTT.text or value and I consistently receive:

You entered an expression that has no value.

Any advice? I am new to report generating so if this is a noob question, my apologies.
 
Try something like this:

Code:
If Me.AvgTT > 85 Then
    Me.AvgTTlbl.Caption = "Exceeded"
Else
    Me.AvgTTlbl.Caption = "Partially Exceeded"
EndIf

Or test the value of AvgTT with this:

Code:
Dim AvgTTTest1, AvgTTTest2
AvgTTTest1 = Me.AvgTT
AvgTTTest2 = 1
If AvgTTTest1 > AvgTTTest2 Then
    MsgBox "1 > 2"
ElseIf AvgTTTest1 < AvgTTTest2 Then
    MsgBox "1 < 2"
ElseIf AvgTTTest1 = AvgTTTest2 Then
    MsgBox "1 = 2"
EndIf

Should give you an idea of how the value of AvgTT is being evaluated.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom