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

Stuart McLachlan stuart at lexacorp.com.pg
Mon Oct 30 15:57:41 CDT 2017


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

http://www.databasejournal.com/features/msaccess/article.php/3627056/Save-and-Retrieve-
Datasheet-Layout-with-the-Windows-Registry.htm

"In addition to the scenario I described above, this process must be followed if you want to 
allow users to modify datasheet layout when they are using a compiled MDE version of your 
Access applications. Since the design view is locked in an MDE, users cannot save 
"changes" to the form. They can move around columns and resize them, but once the form is 
closed, the changes are lost forever. The only way around it is to implement the code I show 
below. "
...
"The data for each datasheet's settings are stored in the Windows Registry under a key with 
the name of the datasheet. The LoadUserColumnSetup pulls that data and applies it, while 
the SaveUserColumnSetup writes the latest data back to the Registry. Each of those 
functions take an Access.Form variable, which can be identified by the Me object to simplify 
the application of the code. Below is a listing of all the code involved. Comments interspersed 
will explain the process. "
...


On 30 Oct 2017 at 9:27, Rocky Smolin wrote:

> Dear List:
> 
> 
> 
> I have a form with a sub-form - the subform is datasheet view because
> the user needs to be able to change the column widths and order.  This
> works in a mdb and an accdb - the changes are save so when the user
> returns to the form the altered order and widths are retained and
> displayed.  
> 
> 
> 
> But while the user can change the order and column widths in the mde
> and accde versions, the changes are not saved.  
> 
> 
> 
> Is there a workaround for this?  
> 
> 
> 
> MTIA
> 
> 
> 
> 
> 
> Rocky Smolin
> 
> Beach Access Software
> 
> 760-683-5777
> 
>  <http://www.bchacc.com> www.bchacc.com
> 
>  <http://www.e-z-mrp.com> www.e-z-mrp.com
> 
> Skype: rocky.smolin
> 
> 
> 
> 
> 
> -- 
> 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