G
Gale Coleman
Hello all,
I have a field in my form called BDATE.
When I press the Toggle91 button I want it to first check to see if BDATE is
populated and if it is, then go on with changing the Age field. I got it to
change the age correctly when the button is pushed. I just don't know how
to tell it not to calculate age if there is nothing in the BDATE field. Any
suggestions?
Thanks
Gale
Private Sub Toggle91_GotFocus()
Dim dtmDate As Date
dtmDate = Date
Me!AGE = DateDiff("yyyy", Me!BDATE, dtmDate) + (dtmDate <
DateSerial(Year(dtmDate), Month(Me!BDATE), Day(Me!BDATE)))
End Sub
I have a field in my form called BDATE.
When I press the Toggle91 button I want it to first check to see if BDATE is
populated and if it is, then go on with changing the Age field. I got it to
change the age correctly when the button is pushed. I just don't know how
to tell it not to calculate age if there is nothing in the BDATE field. Any
suggestions?
Thanks
Gale
Private Sub Toggle91_GotFocus()
Dim dtmDate As Date
dtmDate = Date
Me!AGE = DateDiff("yyyy", Me!BDATE, dtmDate) + (dtmDate <
DateSerial(Year(dtmDate), Month(Me!BDATE), Day(Me!BDATE)))
End Sub