[AccessD] Changing Column Width and Order in mde or accde
Bill Benson
bensonforums at gmail.com
Mon Oct 30 14:11:42 CDT 2017
Rocky,
Still I would go with the backend table to store the user's preferences.
And of course, a bunch of code. You should be able to set the ColumnOrder
property of each field in the subform, in that form's load event. The
backend table would have
SubformName SubFormField UserName OrderWhenLastClosed
Update that table on close event of the subform.
Bill
On Mon, Oct 30, 2017 at 2:50 PM, Rocky Smolin <rockysmolin at bchacc.com>
wrote:
> Bill:
>
> It has to work in an mde or accde. So I don't think I can open the form in
> design view. I also have to save the column widths.
>
> Further complication - there are 11 of these sub forms each for a different
> back end table and an option frame on the parent form with 11 buttons.
> When
> the user selects a different table I change the source of the subform
> objet.
> Works fine, though - I added an (admitted) kludge to save the field orders
> and widths. But it only worked in mdb/accdb not mde/accde.
>
> So I think if I can find a way to do one I can do all 11.
>
> T&R
>
> Rocky
>
>
> -----Original Message-----
> From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
> Bill Benson
> Sent: Monday, October 30, 2017 11:40 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Changing Column Width and Order in mde or accde
>
> I don't think so. Column order defaults to the order in which the fields
> were added to the data sheet subform. Perhaps what you could do however is
> keep a table with their column and their user name, on the back end.
>
> Make the subform control's sourceobject an empty string, save the parent
> form.
>
> In the open event of the parent form, open the subform in design view
> (using
> VBA code), dynamically add fields in the order specified in the backend
> table, save, and close the local subform. Then in the Load event of the
> parent form, re-associate the sourceobject.
>
> I think at that point the subform's fields will be in the correct order.
>
> Bill
>
> On Mon, Oct 30, 2017 at 12:27 PM, Rocky Smolin <rockysmolin at bchacc.com>
> 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
> >
> --
> 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