Full Version: Hide field in new record
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
mocosa206
I have a form that i want to add a combo box. when a user select a context i want show some field. but when they enter a new record i want does field to be hide again.
SerranoG
Welcome to UtterAccess!

Suppose the combobox is called cboMyComboBox and suppose the field you want to hide is a textbox called txtMyTextBox. Then put this on the form's ON CURRENT event:

CODE
Me.txtMyTextBox.Visible = Not Me.NewRecord


Then on the combobox's AFTER UPDATE event, put this

CODE
Me.txtMyTextBox.Visible = Not IsNull(Me.cboMyComboBox)


Edited by: SerranoG on Mon Dec 6 16:51:24 EST 2004.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.