[AccessD] Changing Column Width and Order in mde or accde

Gustav Brock gustav at cactus.dk
Tue Oct 31 02:33:54 CDT 2017


Hi Stuart

Oh no. "All you need" is to read and save the properties of the columns to a set (a tree) of tables before closing the form, then read from the tables and restore the settings when opening the form.

I once wrote a full system for a client who wanted this feature. It went a bit like this:

ID UserSettingFormSubformID Name ColumnOrder	ColumnWidth	ColumnHidden
1  1	ID		1	-1	Sand
2  1	Dimension		2	1875	Sand
3  1	DimensionElementOrder	4	-1	Falsk
4  1	DimensionElement	3	1995	Falsk
5  1	DimensionElementProportion 5	2850	Falsk

Those basic settings are not difficult. The challenge is the get hold on frozen columns. Sort order for each column was also added.

I considered writing an article about this but gave up, as the setup was heavily intermixed with application settings for Format and Conditional Formatting, as well as default settings which - and this is important - the user could choose to revert to in case he/she got the layout garbled beyond easy restoring at the user level.

Add to this maintenance of the settings. It was a large application and just about all forms had subforms in datasheetview. We made a function to rebuild all the current settings as default settings; this function was called when the user belonged to the developer group of users.

/gustav


-----Oprindelig meddelelse-----
Fra: AccessD [mailto:accessd-bounces at databaseadvisors.com] På vegne af Stuart McLachlan
Sendt: 30. oktober 2017 21:58
Til: Access Developers discussion and problem solving <accessd at databaseadvisors.com>
Emne: Re: [AccessD] Changing Column Width and Order in mde or accde

Just found this - turns out you need to manipulate the Registry!!! 



More information about the AccessD mailing list