Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIf statements in Report 1

Status
Not open for further replies.

Maker1

Technical User
Jun 20, 2003
73
US
I am trying to have the report enter the state in a field based the city in another. The statemnet I have in the text box is

Iif([Location of Incident]="Maumelle","AR","MO")

The system keeps telling me I have a syntax error. I think this should work, any idea's?

I am using Access 2000 and would rather not add a State field into the base table if I can avoid it.
 
This looks like it might be a maintenance nightmare if your locations expand to other locations in AR.
I suspect your problem might be the name of the text box. It can't be the same as a name of a field. You must also have "=" to the left of the expression.
=IIf([Location of Incident]="Maumelle","AR","MO")

Duane
MS Access MVP
 
Duane,

Your comment on the fieldname not being the same as the textbox, just solved my #error!!!!

T. Blom
Information analyst
tbl@shimano-eu.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top