I have an access database that I have various check boxes and text boxes on. I want to be able to use the AfterUpdate event when a checkbox is checked to assign text data to a text box. Both are linked to the database of course. When I code it and try to perform the function I get the Run-Time Error 2115, which states the macro or validation rule is not allowing the databaes to be updated. I have no macro or validation rule. My code is below..
Private Sub chkdti_AfterUpdate()
If chkdti.Value Then
Me.txtenvdti.SetFocus
Me.txtenvdti.Text = "X"
Me.chkdti.SetFocus
Else
Me.txtenvdti.SetFocus
Me.txtenvdti.Text = ""
Me.chkdti.SetFocus
End If
End Sub
Private Sub chkdti_AfterUpdate()
If chkdti.Value Then
Me.txtenvdti.SetFocus
Me.txtenvdti.Text = "X"
Me.chkdti.SetFocus
Else
Me.txtenvdti.SetFocus
Me.txtenvdti.Text = ""
Me.chkdti.SetFocus
End If
End Sub