G
Guest
Hi,
I am trying to figure out how to create a query with a newly created field
called "Price" whereby the price will be $7.00 if the manually entered text
in the Color field is "black" or if the field is left blank OR the price will
be $10.00 if the manually entered text in the Color field is "color".
My queries below only work for fields with text entered in them (ie black or
color).
Neither one of these functions will show the record with the color field
left blank, but they all give same result:
Price: IIf(IsNull([Color]) Or [Color]="black",7,10)
Price: IIf([Color]=" " Or [Color]="black",7,10)
Price: IIf([Color]='''' Or [Color]="black",7,10)
Price: IIf(IsMissing([Color]) Or [Color]="black",7,10)
I have reviewed some postings with respect to null values and empty strings,
and have tried the following query as well. However, I get an error message
that there is the wrong number of arguments.
Price: IIf(IsNull([Color]),"",IIf([Color])="","",If([Color])="black",7,10))
Your help would be greatly appreciated.
Thanks!
I am trying to figure out how to create a query with a newly created field
called "Price" whereby the price will be $7.00 if the manually entered text
in the Color field is "black" or if the field is left blank OR the price will
be $10.00 if the manually entered text in the Color field is "color".
My queries below only work for fields with text entered in them (ie black or
color).
Neither one of these functions will show the record with the color field
left blank, but they all give same result:
Price: IIf(IsNull([Color]) Or [Color]="black",7,10)
Price: IIf([Color]=" " Or [Color]="black",7,10)
Price: IIf([Color]='''' Or [Color]="black",7,10)
Price: IIf(IsMissing([Color]) Or [Color]="black",7,10)
I have reviewed some postings with respect to null values and empty strings,
and have tried the following query as well. However, I get an error message
that there is the wrong number of arguments.
Price: IIf(IsNull([Color]),"",IIf([Color])="","",If([Color])="black",7,10))
Your help would be greatly appreciated.
Thanks!