What is wrong with my query?

R

Robert

In the criteria of a column in a query I have written the following statement:

IIf(tbl_Budget.MonthYear="Jul 05" And tbl_Budget.GL=60 And
tbl_Budget.Process="S",tbl_Budget.Budget,0))

I get a #Name? error in the field that this is pointing to on the form. Is
it because I have too many And's? Is there a way around this? Thanks. :)
 
U

UpRider

I would make this a calculated field (expression) in the query.

CalcBudget: IIf(tbl_Budget.MonthYear="Jul 05" And tbl_Budget.GL=60 And
tbl_Budget.Process="S",tbl_Budget.Budget,0))

Also, if the double quotes give a problem, try single quotes.

UpRider
 
Top