Problems with calculation in a query

  • Thread starter Thread starter Arnold Roth
  • Start date Start date
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
 
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.
 
Back
Top