I have been trying to research this option and it have had no luck in finding a solution. I am running Access 2003 and have a form with
a text box for entering a "ClosedDate" and a combo box for entering
a Status (Open or Closed).
I want the default value of the StatusID combo box to be "Open",
however, if a date has been entered into the "ClosedDate" text
box, I want the combo box value to change to "Closed". I tried
the following, without success:
Private Sub ClosedDate_AfterUpdate()
If Len([ClosedDate] & "") <> 0 Then
Me.StatusID.Requery
Me.StatusID = 2
Else
Me.StatusID = 1
End If
End Sub
You may think that having both a status indicator as well as
a closed date field is muda, but I have reasons for this based
on requests from the 100 or so users on the form. Any help
you can offer would be appreciated. Thank you.
a text box for entering a "ClosedDate" and a combo box for entering
a Status (Open or Closed).
I want the default value of the StatusID combo box to be "Open",
however, if a date has been entered into the "ClosedDate" text
box, I want the combo box value to change to "Closed". I tried
the following, without success:
Private Sub ClosedDate_AfterUpdate()
If Len([ClosedDate] & "") <> 0 Then
Me.StatusID.Requery
Me.StatusID = 2
Else
Me.StatusID = 1
End If
End Sub
You may think that having both a status indicator as well as
a closed date field is muda, but I have reasons for this based
on requests from the 100 or so users on the form. Any help
you can offer would be appreciated. Thank you.