[AccessD] List order in listbox

Stuart McLachlan stuart at lexacorp.com.pg
Wed Feb 15 21:41:50 CST 2023


Another example of "to a man with a hammer, everything looks like a nail" ? :)

On 15 Feb 2023 at 21:13, John Colby wrote:

> LOL.  Create a class to wrap the combo in.  Then place the code in that
> class instead of the form.  That allows the code to travel with the class
> instead of being embedded in each form.
> 
> On Wed, Feb 15, 2023 at 7:24 PM <dw-murphy at cox.net> wrote:
> 
> > Never mind. I got too clever for myself. I forgot that I had some code
> > behind the form that sets the listbox row source after a combo box updates.
> > Duh! I created this app a few months ago and the person using it ask for
> > the
> > sorting. Memory being what it is I forgot how it works so just updated the
> > row source sql.
> >
> > Brain isn't getting any better with time.
> >
> > -----Original Message-----
> > From: AccessD <accessd-bounces+dw-murphy=cox.net at databaseadvisors.com> On
> > Behalf Of dw-murphy at cox.net
> > Sent: Wednesday, February 15, 2023 10:57 AM
> > To: 'Access Developers discussion and problem solving'
> > <accessd at databaseadvisors.com>
> > Subject: [AccessD] List order in listbox
> >
> > Folks,
> >
> > Have not been doing much Access as I have pretty much fully retired. I am
> > creating a small Access application for a group I belong to. While some
> > things take a little longer is seems I have retained most of the basics.
> > One
> > thing that isn't working is getting a list box to sort properly. The row
> > source for the list box is a saved query that filters from the ID value of
> > the form the list box is on. My recollections is the list box reflects the
> > sorting of its row source, in this case the query.  When I open the query
> > it
> > sorts properly. The list box is sorting alphabetically on the visible
> > field,
> > not on the not visible column that it should be. The sort column is
> > available in the listbox, but has it's column width set to 0. Not sure what
> > is going on here.
> >
> > Doug
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> 
> 
> -- 
> John W. Colby
> Colby Consulting
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list