[AccessD] List order in listbox

John Colby jwcolby at gmail.com
Wed Feb 15 22:13:56 CST 2023


LOL, I do more with a class than most do with the entire vba language.
Just my opinion of course.  And why would you put a line of code in a form
that you will need in the next form as well.  JMOOC.

You see, I have done exactly this.  A wrapper for a combo that handles such
stuff.  And I can now just dim a class, pass in the combo and be done with
it.

It is you that sees everything as a nail, not I.

As it happens I wrote an entire framework which I can just instantiate and
have a very seamless and consistent UI instantly applied to any app I
choose.  Even one I didn't write.  But what do I know?  All these damned
nails everywhere.  Where's my hammer again?

On Wed, Feb 15, 2023 at 10:41 PM Stuart McLachlan <stuart at lexacorp.com.pg>
wrote:

> 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
> >
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


-- 
John W. Colby
Colby Consulting


More information about the AccessD mailing list