Prevent form change

A

acss

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?
 
J

Jeff Boyce

"How" depends on which version of Access you are using...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
A

acss

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?
 
U

UpRider

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
 
A

Albert D. Kallal

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top