14Jan/091
Odd Case Statement
It's not the worst code I've ever seen and it certainly gets the job done, but i've never seen a case statement written in this manner before.
Select Case True
Case CDate(.Fields("Status2_Date")) < CDate(.Fields("Begin_Date")) And CDate(.Fields("Status1_Date")) > CDate(.Fields("Begin_date"))
.Fields("Begin_date") = .Fields("Status1_Date")
Case CDate(.Fields("Status2_Date")) > CDate(.Fields("Begin_Date"))
'Stuff
End Case
January 14th, 2009 - 22:01
Where do you find this stuff? I would assign dates to local variables to limit property access. I assume .Fields is the reader field collection? Is there an IsDate check somewhere for null checks?