Delores_C
asked on
Query in Access 2007
Field1 = Type (text field)
Field2 = DOA (Date field)
Field3 = TypeAddress (Text field)
New Field:=IIF([Type]=”92”,[DO A])
I need the NewField to show the DOA field if the Type equals 92
Field2 = DOA (Date field)
Field3 = TypeAddress (Text field)
New Field:=IIF([Type]=”92”,[DO
I need the NewField to show the DOA field if the Type equals 92
ASKER
I do not want anything to show
Are the slanted quotes a typo?
Have you tried single quotes?
NewField:Iif([Type]='92', [DOA], '')
Have you tried single quotes?
NewField:Iif([Type]='92', [DOA], '')
Okay - the above should work for you. Just use that as an expression for a new field:
NewField: IIF([Type]=”92”,[DOA], "")
NewField: IIF([Type]=”92”,[DOA], "")
>> Are the slanted quotes a typo?
Good catch. I bet they were copied in from MS Word. I wonder if they make a difference?
Good catch. I bet they were copied in from MS Word. I wonder if they make a difference?
ASKER
Not working, this is an exact copy of the query I have.
PatDOB: IIf([Reference]="PROGRESSI VE",[DateO fBirth],"" )
The Reference is the Provider name field , the "Progressive" is the name of the provider and the DateOfBirth is the field I want to show only if the provider name is Progressive.
PatDOB: IIf([Reference]="PROGRESSI
The Reference is the Provider name field , the "Progressive" is the name of the provider and the DateOfBirth is the field I want to show only if the provider name is Progressive.
'Not working' how?
Error? Incorrect result? Crashing database?
Error? Incorrect result? Crashing database?
What is it showing?
ASKER
I am not getting anything in the field. Could it be because the results is a date field and the criteria is a text field?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The field types shouldn't matter.
Where are you using this expression?
Query? Form? Report?
Where are you using this expression?
Query? Form? Report?
Is Reference defined as a lookup field?
If so, you have to test for its (probably numeric) ID value, not the visible value.
If so, you have to test for its (probably numeric) ID value, not the visible value.
ASKER
it's working, thanks alot!
Good deal :)
ASKER
Excellent instructions
This shows a blank:
IIF([Type]=”92”,[DOA], "")