Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Query Help!!!

Status
Not open for further replies.

merc007

Technical User
May 12, 2006
24
US
I have 3 fields in my table. "ListDate", "SoldDate", "CurrentDate". I am trying to create an expression with the following: OnMarket: IIf([SoldDate]="","",[CurrentDate]-[ListDate])

When I run this query it gives me #Error only on the ones that have dates in the "SoldDate" field. How do I rectify this problem? Any help would be greatly appreciated. Thank you.
 
Perhaps this ?
OnMarket: IIf(IsNull([SoldDate]),Null,[CurrentDate]-[ListDate])

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Code:
IIf ( IsNull([SoldDate]), '', Format([CurrentDate]-[ListDate],"0") )

[small]No! No! You're not thinking ... you're only being logical.
- Neils Bohr[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top