Help with VBA Disable/Enable text boxes
Hi,
I'm a SQL programmer mainly, and have never really worked with VBA before. However, I have been tasked with building an access database. Basically, what I am trying to do is on one of the forms there are a set of questions to be answered ("Yes" and "No"). If certain questions are answered in a certain way I want to stop users from entering information into certain other questions. I've looked in a few books and have come up with this code (which I attach as an Event Procedure against AfterUpdate in the properties of the field)
Private Sub PaidEmploy_AfterUpdate()
If DataEntry!PaidEmploy = "Yes" Then
DataEntry!WorkEx.Enabled = False
DataEntry!WorkEx.Locked = True
Else
DataEntry!WorkEx.Enabled = True
DataEntry!WorkEx.Locked = False
End If
End Sub
However, when I run the form it gives me the following error in the debugger;
"Compile Error;
Qualifier must be collection"
Can anyone help me on this please, it would be most appreciated!!!
Thanks
:)
|