Enable / Disable Field based on Combo Selection

390 Views Asked by At

I am new to Access and need assistance in enabling / disabling a field based on another field's selection.

I have a combo box called RegistrationType and if "Individual" is chosen I would like the "Business_Name" textbox to be disabled and if "Company" is chosen I would like it enabled.

Your help would be greatly appreciated :)

I am still having trouble getting this to work. I've tried everything.

So basically i just want to enable "Business Name", "ABN" & "Business Phone" when "Company" is chosen from "Registration Profile" and if "Individual" is chosen to disable them. if anyone can help that would be amazing. I appreciate everyone trying.

enter image description here

1

There are 1 best solutions below

2
Micke On

A simple solution :)

Private Sub Form_Current()
    setRegistrationType
End Sub

Private Sub RegistrationType_AfterUpdate()
    setRegistrationType
End Sub

Private Sub setRegistrationType()
    Me![Business_Name].Enabled = RegistrationType & "" = "Business"
End Sub

This works well for Form-view but not for Continues forms.

Added the empty string in setRegistrationType to handle Null-values in Registration type.