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

Rocky Smolin rockysmolin at bchacc.com
Tue Oct 31 16:19:29 CDT 2017


As I think about it, since it would be an advantage to let each use save their own field order and widths, saving the properties in a front end table might be an advantage.

R


-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence
Sent: Tuesday, October 31, 2017 1:40 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Changing Column Width and Order in mde or accde

An excellent method to save your last position. 

I did a similar process many years ago with VB. Had a module that would open a registry set and then loop around pushing all global variables and position variable into the stack. When the application opened again, even after a system update, each user would have the environment they exited with...if they so chose. Unfortunately, even with the best efforts it was never a hundred percent.

We do now have some excellent sync tools which could make much of that type of work redundant.

Jim 

----- Original Message -----
From: "Gustav Brock" <gustav at cactus.dk>
To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com>
Sent: Tuesday, October 31, 2017 12:33:54 AM
Subject: Re: [AccessD] Changing Column Width and Order in mde or accde

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!!! 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list