As you can tell I am new to Access.
I have a query with a field called Value. I would like to create an
expression field that would give me the following:
If, Value equals IPS or ECR, then IPS/ECR, otherwise use the Value.
I have tried: IIf [Value]=[IPS]![IPS/ECR].
This of course doesn't work, but I am not sure of the wording for such a
statement. Any help would be greatly appreciated.
> As you can tell I am new to Access.
>
[quoted text clipped - 6 lines]
> This of course doesn't work, but I am not sure of the wording for such a
> statement. Any help would be greatly appreciated.
1) Value is a reserved Access/VBA/Jet word and should not be used as a
field name.
For additional reserved words, see the Microsoft KnowledgeBase article
for your version of Access:
109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'
2) After you change the field name to something else try:
Exp:IIf([AValue] = "IPS" or [AValue] = "ECR","IPS/ECR",[AValue])

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Teri - 02 Feb 2006 20:41 GMT
Thanks much, I will check out the resources you suggested.
Teri
> > As you can tell I am new to Access.
> >
[quoted text clipped - 19 lines]
> 2) After you change the field name to something else try:
> Exp:IIf([AValue] = "IPS" or [AValue] = "ECR","IPS/ECR",[AValue])