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

If THen statements

Status
Not open for further replies.
Feb 26, 2004
58
0
0
US
I have a question. For some reason I cannot get my else statement to work in and if then else statement.

I have a multiple statement. When that wouldn't work I have broken it down to one if then else below and the else still will not work.
Are there some querks I should know about.

If DateValue({Brokerage.ExtendDate2}) <> CurrentDate Then
({Brokerage.ExtendDate2})
Else
({Brokerage.ExpirationDate})

I am working in Crystal 9.0 using an access database.

Any suggestions would be helpful.


 
I would imagine you need to get only the date part of the current date, otherwise the time part of that will mean that the two will never be equal
 
I thought the current date only takes the current date as there is also a function of current time?
 
Your formula should work, I think. I wonder about your operator though--you have this set up so that you will only get the expiration date if extenddate2 is the currentdate. I would lay out the fields in the detail section to see whether the logic makes sense. You also might need to check for nulls.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top