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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using If

Status
Not open for further replies.

kathleensfather

Technical User
Joined
Oct 28, 2000
Messages
1
Location
US
I am calculating the number of days between two dates. If I at the time of data entry I don't know the second date, how do I avoid seeing the illogical number in the calculated field ?

Can I use a radio button to activate a second field ?
 
Your calculated field can test the date fields to see if they are blank using the IsBlank() function:

NDays = If(IsBlank(datefld1) or IsBlank(datefld2),0,datefld2 - datefld1)

Sue Sloan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top