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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide column in subform datasheet

Status
Not open for further replies.

vmon

IS-IT--Management
Feb 14, 2002
74
US
I want to hide columns in a subform datasheet based on a checkbox on the main form. The visible property does not work with datasheets. Can I do this with vba? I found the runcommand hidecolumn but don't know how to make it work.

Thanks,
vmon
 
You need to setfocus to the column (control) you want hidden and then hide it. Like this:

txtBoxToHide.SetFocus
DoCmd.RunCommand (acCmdHideColumns)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top