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

The Smiley Coder thesmileycoder at gmail.com
Mon Oct 30 16:36:20 CDT 2017


You could try the code in the attached zip file. I can't take credit for it
myself though, a co-worker wrote it. I've attached both the accde and the
accdb. Seems simple but effective.

Best regards
Anders Ebro // TheSmileyCoder <http://www.thesmileycoder.com>
Access MVP 2014-2018
<http://mvp.microsoft.com/en-us/mvp/Anders%20Ebro-5000469>

On Mon, Oct 30, 2017 at 10:09 PM, Rocky Smolin <rockysmolin at bchacc.com>
wrote:

> Yes but it could be sent in accde.
>
> r
>
> -----Original Message-----
> From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
> Anders Ebro (TheSmileyCoder)
> Sent: Monday, October 30, 2017 1:43 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Changing Column Width and Order in mde or accde
>
> Are you still using mde?
>
> Sent from my mobile device, and thus kept brief.
>
> On 30 Oct 2017, at 19.50, 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
> --
> 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