Conditional visibility based on input (1 Viewer)

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:58
Joined
Oct 29, 2018
Messages
21,467
alright, so i think i finally figured out how to do what i wanted to do. i am using the Form's On Current selection and i am toggling the visibility of the item on and off based on a value in the field. here is a copy of the code that i used.

Code:
Private Sub Form_Current()
If IsNull(Me.Student_1) = False Then
Me.Student_1.Visible = False
Else
Me.Student_1.Visible = True
End If
End Sub

the last issue that i am having is how do i say this same thing for each of the other 15 fields, being that they are each their own and the visibility would depend on each one being filled or not?
Hi. To answer your question, you can specify each control you want to hide. However, the bigger issue you're not seeing is the reason why I gave you a new table structure is because your current table design is not normalized. If you don't normalize your tables, then you'll definitely run into bigger problems in the future. If you're trying to build a database, you might as well build it correctly or you might find yourself getting frustrated going around in circles and wasting time.
 

Users who are viewing this thread

Top Bottom