I have a main form with a subform and I would like to ensure that the end
user can not hide or unhide the columns in the subform. Is there a way to
disable the toolbar to prevent this from happening?
Jeff Boyce - 27 May 2008 22:13 GMT
"How" depends on which version of Access you are using...
Regards
Jeff Boyce
Microsoft Office/Access MVP
>I have a main form with a subform and I would like to ensure that the end
> user can not hide or unhide the columns in the subform. Is there a way to
> disable the toolbar to prevent this from happening?
acss - 27 May 2008 22:51 GMT
It is access 2003 and as stated end users try to treat the subform like
excell by widening the columns and hiding or unhiding. What are the options
to prevent this?
> "How" depends on which version of Access you are using...
>
[quoted text clipped - 6 lines]
> > user can not hide or unhide the columns in the subform. Is there a way to
> > disable the toolbar to prevent this from happening?
UpRider - 27 May 2008 23:10 GMT
Joe, the below code is in the subform. The users can change all they want,
but every time the current record changes it goes back to this! As you see,
you can permanantly hide a column by setting its width to zero.
HTH, UpRider
Private Sub Form_Current()
Me.ILast.ColumnHidden = False
Me.IFirst.ColumnHidden = False
Me.ICARD.ColumnHidden = False
Me.chkInactive.ColumnHidden = False
Me.IYOB.ColumnHidden = False
Me.LastID.ColumnHidden = True
Me.ILast.ColumnWidth = 3375
Me.IFirst.ColumnWidth = 2760
Me.IYOB.ColumnWidth = 700
Me.ICARD.ColumnWidth = 765
Me.chkInactive.ColumnWidth = 880
Me.LastID.ColumnWidth = 0
' Debug.Print ILast.ColumnWidth
' Debug.Print IFirst.ColumnWidth
' Debug.Print ICARD.ColumnWidth
' Debug.Print LastID.ColumnWidth
End Sub
>I have a main form with a subform and I would like to ensure that the end
> user can not hide or unhide the columns in the subform. Is there a way to
> disable the toolbar to prevent this from happening?
Albert D. Kallal - 28 May 2008 06:00 GMT
Actually what I would suggest you use in this case is a continuous sub form.
A continuous form an MS access looks very much like a datasheet, but the
users cannot resize it in any way at all.
Here's some screen shots of some continuous forms, and several of them who
have some forms, they should give you some ideas of layout and what I mean
by continuous forms.
http://www.members.shaw.ca/AlbertKallal/Articles/Grid.htm

Signature
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com