G
Gina Whipp
Hello All,
I am at a loss why I can't get a simple price.
Public Function ServiceZone(Mileage) As Currency
'created 8.22.2007
Dim Crit
Crit = "([szMileageFrom] => " & Mileage & ") "
Crit = Crit & "And ([szMileageTo] =< " & Mileage & ") "
ServiceZone = DLookup("szChargeAmount", "tblServiceZones", Crit)
End Function
To Test:
?ServiceZone(4.5) <--- this should give me 35.00 but instead I get a
syntax error "missing operator in query expression '([szMileageFrom]=> 4.5
And ([szMileageTo] = < 4.5) ' ", highlighting the DLookup line. Any help
would be appreciated.
I am at a loss why I can't get a simple price.
Public Function ServiceZone(Mileage) As Currency
'created 8.22.2007
Dim Crit
Crit = "([szMileageFrom] => " & Mileage & ") "
Crit = Crit & "And ([szMileageTo] =< " & Mileage & ") "
ServiceZone = DLookup("szChargeAmount", "tblServiceZones", Crit)
End Function
To Test:
?ServiceZone(4.5) <--- this should give me 35.00 but instead I get a
syntax error "missing operator in query expression '([szMileageFrom]=> 4.5
And ([szMileageTo] = < 4.5) ' ", highlighting the DLookup line. Any help
would be appreciated.