Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to hide a subform's ID field 2

Status
Not open for further replies.

cfvcf

Technical User
Nov 8, 2007
77
US
I have a form that has a subform, the subform has a field called ID, which means nothing to the user, but it does to the code. I have the properties set to visible NO and also when I open the form that uses the subform, I set it to visible = false, but it still displays. What am I missing?

Thanks!
 
In the Form_Current event put

Me.Controls("NameOfControl").ColumnHidden = True



Paul
 
Sorry, it is the Form_Current event, but it's for the subform current event, not the main form.

Paul
 
Great, I'll look at this in the morning. Guess I thought it would be the .visible. Haven't tried the hidden!
 
Is the subform in datasheet view?

Note The ColumnHidden property applies to fields in Datasheet view and to form controls when the form is in Datasheet view.

Hiding a column with the ColumnHidden property in Datasheet view doesn't hide fields from the same column in Form view. Similarly, setting a control's Visible property to False in Form view doesn't hide the corresponding column in Datasheet view.
 
I coded the columnhidden in the open of the subform which is a datasheet and everything works great! Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top