Datasheet Column Widths

C

Confused Slug

Is it possible to prevent the column widths on a subform, in datasheet view,
from being changed or to prevent any changes from being saved? The data in
the cells would still need to be available for modification.

????? me.datasheetcolumnwidth.enabled = false ?????

Thanks
 
D

Dirk Goldgar

Confused Slug said:
Is it possible to prevent the column widths on a subform, in datasheet
view,
from being changed or to prevent any changes from being saved? The data in
the cells would still need to be available for modification.


In addition to what has already posted, there's Stephen Lebans'
AutoColumnWidth database, which contains a class module to freeze column
widths.

http://www.lebans.com/autocolumnwidth.htm
 
D

David W. Fenton

If it's possible, it'll likely be mentioned in MichKa's "You Can
Do That with Datasheets?" at
http://msdn.microsoft.com/en-us/library/aa217449(office.11).aspx

Indeed, that article discusses the very issue.

The interesting thing to me is that he doesn't talk about using the
events of the datasheet, which are just as powerful as for any form.
Certainly, there's nothing really different about datasheet events,
but I'm surprised he didn't mention it. The realization that a
datasheet was a form came to me only in the last couple of months
while working in the object browser -- as Michael mentions in the
article, if you look there you'll see that a datasheet is an object
of type FORM.
 

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