Full Version: Hide Form Fields based on value of other fields
UtterAccess Forums > Microsoft® Access > Access Forms
tothebeat
I have a form set up with a search box at the top and data below.
asically, the data is an applicant record. If the applicant is marked at "Not Hirable", I want all the fields about Orientation and Department Placement to be hidden.
If the applicant is marked as Hirable, Pending, or is blank, then the Orientation and Department Placement fields should be visible.
Can anyone help with that scenario?
Thanks,
John
theDBguy
Hi John,
Welcome to Utter Access!
In the Form's Current event, you could do something like:
If Me.ControlName = "Not Hirable" Then
Me.Orientation.Visible = False
Me.DepartmentPlacement.Visible = False
Else
Me.Orientation.Visible = True
Me.DepartmentPlacement.Visible = True
End If
Hope that helps...
tothebeat
That was it. Thank you so much.
John
theDBguy
You're welcome, John. Good luck with your project.
Haggard Hunter
Is there a way of selecting multiple form field controls at a time rather than listing them individually?
theDBguy
Hi,
welcome2UA.gif
Yes there is but it requires a little bit of setup.
You can use the control's Tag property to identify the controls you would like to manipulate. Then, you can cycle through all the Form's controls collection and check the Tag property to see if you need to act on that control.
Hope that helps...
Haggard Hunter
Thanks
theDBguy
Good luck!
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.