Solved Hide / Show column in datasheet view of subform with button (1 Viewer)

BJF

Registered User.
Local time
Today, 18:10
Joined
Feb 19, 2010
Messages
133
Hello,

I want to hide or show a column on a subform thats in datasheet view by pressing a button on the main form.

Here is the code that I tried so far on the button but neither of the code below are not working.



Forms(frmOpenOrdersByCustomer!fsubOpenOrdersByCustomer).Form.Controls("ShipToCustomer").ColumnHidden = False



Me.fsubOpenOrdersByCustomer.Form!ShipToCustomer.Visible = True
Me.Refresh


Thanks,
BJF
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 06:10
Joined
May 7, 2009
Messages
19,231
To Show:

Me!fsubOpenOrdersByCustomer.Form!ShipToCustomer.ColumnHidden = False

To hide:

Me!fsubOpenOrdersByCustomer.Form!ShipToCustomer.ColumnHidden =True
 
  • Like
Reactions: BJF

BJF

Registered User.
Local time
Today, 18:10
Joined
Feb 19, 2010
Messages
133
To Show:

Me!fsubOpenOrdersByCustomer.Form!ShipToCustomer.ColumnHidden = False

To hide:

Me!fsubOpenOrdersByCustomer.Form!ShipToCustomer.ColumnHidden =True
Thank you!
 

Users who are viewing this thread

Top Bottom