A
Ann
Help, I haven't a clue why this won't work.
If Me.dtmClosedDate < Me.dtmOpenDate Then
MsgBox "The Closed Date can not be prior to the Open Date."
Me.dtmClosedDate.Value = ""
Me.dtmClosedDate.SetFocus
End If
The message box appears, the old date is removed from the field but the set
focus won't work. I've also tried gotocontrol but my cursor just ends up on
the next field. I tried cancelling the event but the same thing happens.
If I used Text instead of Value I get a run time error 2115 which says "The
macro or function set to the BeforeUpdate or Validation Rule property for
this field is preventing Microsoft Access from saving the data in the field."
but I don't have anything in BeforeUpdate or the Validation Rule property.
Can anyone help me out? Thanks in advance.
If Me.dtmClosedDate < Me.dtmOpenDate Then
MsgBox "The Closed Date can not be prior to the Open Date."
Me.dtmClosedDate.Value = ""
Me.dtmClosedDate.SetFocus
End If
The message box appears, the old date is removed from the field but the set
focus won't work. I've also tried gotocontrol but my cursor just ends up on
the next field. I tried cancelling the event but the same thing happens.
If I used Text instead of Value I get a run time error 2115 which says "The
macro or function set to the BeforeUpdate or Validation Rule property for
this field is preventing Microsoft Access from saving the data in the field."
but I don't have anything in BeforeUpdate or the Validation Rule property.
Can anyone help me out? Thanks in advance.