Adding field to query

  • Thread starter Thread starter gator
  • Start date Start date
G

gator

I want to use an IF statement to extract some digits from cell data. A cell
has a number like 90115 which represents 01/15/2009. I want to extract 9
from the cell into another cell so I can use a PIVOT Table more efficiently.
My question is where do I put the IF to make the extraction? The IF
stat5ement I have is
Year: IF(Len([myDate])=6,Left([myDate],2),Left([myDate],1)) which I have
located in a new field, as field name, in my query design. I get an error
saying Undefined function 'IF' in expression. Can someone help me?
 
Access doesn't have cells.

Access doesn't have an IF function.

It does have an IIf function though which should do what you want.
 
Back
Top