G
Guest
I have developed a database in Access to track support issues. I have created a data entry form which has a field called CompletionDate and another field called StatusOf. When the CompletionDate is not empty I want the StatusOf text box to change to "Closed". When the form is closed without entering a CompletionDate I want the StausOf textBox to read "Open".
I have been working on the CompletionDate event and this is what I have but I keep getting an error 2115 "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."
After I clear the error off of the screen "Closed" is entered into the StatusOf field.
Private Sub CompletionDate_AfterUpdate()
If CompletionDate.Text <> "" Then
StatusOf.SetFocus
StatusOf.Text = "Closed"
End If
End Sub
I have been working on the CompletionDate event and this is what I have but I keep getting an error 2115 "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."
After I clear the error off of the screen "Closed" is entered into the StatusOf field.
Private Sub CompletionDate_AfterUpdate()
If CompletionDate.Text <> "" Then
StatusOf.SetFocus
StatusOf.Text = "Closed"
End If
End Sub