Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

>= is not working

Status
Not open for further replies.

cneill

Instructor
Mar 18, 2003
210
GB
Public Sub TTargetStatusCFL()

Dim CurrentDate As String, LValue As Integer, Target As String, Days As Integer


CurrentDate = Format(Date, "Short Date")
LValue = DateDiff("d", CurrentDate, #12/31/2009#)
Days = 365 - LValue


Target = (Reports![RptTeamSchemeKTCO2Performance09]![TCFLTarget09] / 365) * Days

If Reports![RptTeamSchemeKTCO2Performance09]![TCFL] >= Target Then
Reports![RptTeamSchemeKTCO2Performance09]![LabelCFLAbove].Visible = True
Reports![RptTeamSchemeKTCO2Performance09]![LabelCFLBelow].Visible = False
End If

If Reports![RptTeamSchemeKTCO2Performance09]![TCFL] < Target Then
Reports![RptTeamSchemeKTCO2Performance09]![LabelCFLAbove].Visible = True
Reports![RptTeamSchemeKTCO2Performance09]![LabelCFLBelow].Visible = False
End If

End Sub

TCFL is returning a value of 9 (this is correct)
Target is returning a value of 26 (this is correct)
But the >= is not working
for you info the 26 is inclosed in "26" where as the 9 is not
can someone help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top