AutoColumnWidth
(1)
Database
(1)
DougSteele
(1)
Datasheets
(1)
Docmd.close
(1)
Aa217449
(1)
Months
(1)
Com
(1)

Datasheet Column Widths

Asked By Confused Slug
21-Nov-09 01:17 PM
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

To stop changes from being saved:You can force the form to not save changes

Mark Andrews replied to Confused Slug
21-Nov-09 02:15 PM
To stop changes from being saved:
You can force the form to not save changes when using docmd.close (see the
arguments for this action) or
you can use the access runtime where form changes will never be saved.

To stop changes from being allowed to happen I found this article:
http://www.dbforums.com/microsoft-access/1613454-lock-edit-column-size-datasheet-view.html

HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com

If it is possible, it will likely be mentioned in MichKa's "You Can Do

Douglas J. Steele replied to Confused Slug
21-Nov-09 02:37 PM
If it is possible, it will likely be mentioned in MichKa's "You Can Do That
with Datasheets?" at
http://msdn.microsoft.com/en-us/library/aa217449(office.11).aspx

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

In addition to what has already posted, there is Stephen

Dirk Goldgar replied to Confused Slug
21-Nov-09 05:12 PM
In addition to what has already posted, there is Stephen Lebans'
AutoColumnWidth database, which contains a class module to freeze column
widths.

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

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)
Indeed, that article discusses the very issue.
David W. Fenton replied to Douglas J. Steele
21-Nov-09 05:51 PM
Indeed, that article discusses the very issue.

The interesting thing to me is that he does not talk about using the
events of the datasheet, which are just as powerful as for any form.
Certainly, there is nothing really different about datasheet events,
but I am surprised he did not 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 will see that a datasheet is an object
of type FORM.

--
David W. Fenton                  http://www.dfenton.com/
usenet at dfenton dot com    http://www.dfenton.com/DFA/
Post Question To EggHeadCafe