Tiosylanyl
New Member
- Joined
- Jul 31, 2006
- Messages
- 48
Hello,
I'm working on a user entry form, and I have a field that enables/disables and nulls depending on a response given in a combo box (LOA).
Here is the code that I'm using:
This works fine from a user entry standpoint up until I begin to scroll through subsequent records. For instance, if my first record has "No" in the LOA combo box, the Start Date field is null. When I scroll to the next record, if the LOA combo is "Yes" (and therefore a value already entered into the Start Date field), the Start Date field still maintains its value, but it becomes disabled.
I can remedy this by changing the value in the LOA combo box and resetting it, however, I was wondering if anyone out there knows of an addition I can make to the code that would take care of this.
Thanks in advance.
I'm working on a user entry form, and I have a field that enables/disables and nulls depending on a response given in a combo box (LOA).
Here is the code that I'm using:
Code:
Private Sub LOA_AfterUpdate()
If Me.LOA = "No" Then
Me.Start_Date.Enabled = False
Start_Date = Null
End If
If Me.LOA = "Yes" Then
Me.Start_Date.Enabled = True
End If
End Sub
This works fine from a user entry standpoint up until I begin to scroll through subsequent records. For instance, if my first record has "No" in the LOA combo box, the Start Date field is null. When I scroll to the next record, if the LOA combo is "Yes" (and therefore a value already entered into the Start Date field), the Start Date field still maintains its value, but it becomes disabled.
I can remedy this by changing the value in the LOA combo box and resetting it, however, I was wondering if anyone out there knows of an addition I can make to the code that would take care of this.
Thanks in advance.