Help!!! if field is like something

hullstorage

Registered User.
Local time
Today, 14:47
Joined
Jul 18, 2007
Messages
213
this is what a am tring to do:

i have a report that show me various postcodes
like this

postcode field surcharge field
ab43 1ul 6.00
ab1 1un 6.00
hu1 1un 0.00
nr11 1ez 0.00
ky11 1en 12.00
ky1 1up 12.00

so what i am trying to do is create a surcharge field and if
the postcode is something begining with AB then surcharge field = 6.00
and if KY then surcharge is 12.00

any help please
 
If these are values already in a field then why are they not displayed already? I don't understand.....
 
sorry there isnt
basically if i open a report and the postcode field is like AB** then the surcharge field
would be 6.00
i think it a bit like
if postcode is like ab** then surcharge = 6.00
and if postcode is like KY** then me.surcharge=12.00
 
Would something like this work?

IIf(postcode LIKE "ab*", 6.00, IIf(postcode LIKE "ky*", 12.00, 0.00))
 
tried nothing happening just getting a lot of error message
unless i am doing something wrong
 
You should be doing this in the query on which the report is based.

Brian
 
These values should be stored along with the rest of the record details, they'd probably be taken from a lookup table at the time of the record creation
 

Users who are viewing this thread

Back
Top Bottom