query help

hayden

Registered User.
Local time
Today, 23:11
Joined
Mar 16, 2010
Messages
49
I have gone into query design and want to know what function i use so that if value =1 in my table that it changes to so that grass is displayed
 
Try an IIf() function.
 
tried doing that put =IIf([surface type]=1,"grass",0) but didnt work :-/
 
In a query you wouldn't want the "=". In design view it would look like:

PickAnyName: IIf([surface type]=1,"grass",0)
 
what does the PickAnyName: mean because copied pasted in and came up with an error message saying
you may have entered an invalid identifier ir typed parenttheses following the null constant

highlighting the first bracket?
 
PickAnyName is simply an alias; it can be anything that you want it to be. Where exactly did you put it? It was intended to be a new field in a query in design view.
 
i did not put it in a new field, i have now put it in a field but it comes up with up with #Error
 
Can you post the db?
 

Users who are viewing this thread

Back
Top Bottom