Problems with calculation in a query

A

Arnold Roth

I am attempting to run a calculation as part of a query.
The calculation is simply to add a number of days to a
date depending on the type of activity needed for the
particular function. The code is shown below:

Planned Submittal Date: IIf(UPPER([Verification Methods]!
[NG ACC METH])="TEST",DateAdd("d",30,[HEO2 Verification
Events]![Event_Date]),IIf(UPPER([Verification Methods]![NG
ACC METH])="DEMO",DateAdd("d",20,[HEO2 Verification
Events]![Event_Date]),IIf(UPPER([Verification Methods]![NG
ACC METH])="INSPECTION",DateAdd("d",10,[HEO2 Verification
Events]![Event_Date]),40))).

The logic is supposed to be that if we find test in the
field [Verification Methods]![NG ACC METH] we add 30 days,
etc.

The problem is that when I enter the code on the design
grid I get an error message "UPPER" is not defined. When
I invoke the help it tells me about the upper function.
Does anyone have a clue as to what might be happening?

Thanks
 
F

fredg

I am attempting to run a calculation as part of a query.
The calculation is simply to add a number of days to a
date depending on the type of activity needed for the
particular function. The code is shown below:

Planned Submittal Date: IIf(UPPER([Verification Methods]!
[NG ACC METH])="TEST",DateAdd("d",30,[HEO2 Verification
Events]![Event_Date]),IIf(UPPER([Verification Methods]![NG
ACC METH])="DEMO",DateAdd("d",20,[HEO2 Verification
Events]![Event_Date]),IIf(UPPER([Verification Methods]![NG
ACC METH])="INSPECTION",DateAdd("d",10,[HEO2 Verification
Events]![Event_Date]),40))).

The logic is supposed to be that if we find test in the
field [Verification Methods]![NG ACC METH] we add 30 days,
etc.

The problem is that when I enter the code on the design
grid I get an error message "UPPER" is not defined. When
I invoke the help it tells me about the upper function.
Does anyone have a clue as to what might be happening?

Thanks

Upper(), as far as I know, is an Excel function to convert text to
Upper Case. It is not an Access function, at least through Access
2002.
In Access you would use UCase(etc).

Since Access is case insensitive, would your results be skewed if you
simply didn't use it in the SQL.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top