Fields displayed based on entry field

J

John Vinson

What's the code for a field to display based on an entry of a field

You'll have to explain what you mean. "Entry of a field" means nothing
to me.

John W. Vinson[MVP]
 
J

JAB

For example: I have a field in the form that requires yes or no. If the user
enter yes then three other fields in the forn are displayed. If the user
enter "no" the other fields does not display.

So depending on the entry in one specific field the rest of the designated
field would display.
 
J

John Vinson

For example: I have a field in the form that requires yes or no. If the user
enter yes then three other fields in the forn are displayed. If the user
enter "no" the other fields does not display.

So depending on the entry in one specific field the rest of the designated
field would display.

Thanks, that's much clearer!

One jargon term that might help: Tables have fields. Forms have
controls. You can make *controls* visible or invisible - but not
fields.

You'll need just a bit of VBA in the AfterUpdate event *and* the
Form's Current event (for existing records), like

Private Sub chkMyYesNo_AfterUpdate()
Me.txtThisControl.Visible = Me.chkMyYesNo
Me.txtThatControl.Visible = Not Me.chkMyYesNo
End Sub

will make txtThisControl visible if you check the checkbox chkMyYesNo,
and invisible if you uncheck it; vice versa for txtThatControl.

You'ld put the same code in the form's Current event.

John W. Vinson[MVP]
 
J

JAB

Thank you! I am glad that you educate me on the terms. It makes it easy for
me to understand. I am going to give it a try. I have been searching for the
answer for hours and was unable to because my termonolgy was incorrect. Thanx
 
Top