I'm a newbie at Access and am trying to get fields (like 'cs_compl', 'ec_compl', etc) in a form to grey out depending on the value entered into the 'type' field. However, 'type' is a calculated field dependent on the the value entered in the 'barcode' field. I'm using the following code:
Thanks for any advice!
Code:
Private Sub barcode_AfterUpdate()
Me.cs_compl.Enabled = (Me.type.AfterUpdate <= 4 Or Me.type.AfterUpdate = 6 Or 7 Or 8)
cm_compl.Enabled = (Me.type.AfterUpdate <= 4 Or Me.type.AfterUpdate = 6 Or 7 Or 8)
ec_compl.Enabled = (4 <= Me.type.AfterUpdate >= 6)
Me.en_compl.Enabled = (Me.type.AfterUpdate = 1 Or 8)
Me.pe_compl.Enabled = (Me.type.AfterUpdate = 3 Or 4)
Me.uf_compl.Enabled = (Me.type.AfterUpdate = 3)
Me.ad_compl.Enabled = (4 <= Me.type.AfterUpdate >= 6)
End Sub
Comment