[AccessD] List order in listbox

Arthur Fuller fuller.artful at gmail.com
Thu Feb 16 10:44:35 CST 2023


John et.al.,

Please appreciate the distinction between two words: Class and Framework.
The distance between them is immense, and critically important, if you want
really clean code.
A Class provides a neat and clean way to define the characteristics and
optionally, the behaviour of, a collection of similar objects. The
programmer is free to use any given Class, and to write variants
(subClasses), each supplying attributes and methods unique to said subClass.
A Framework, by contrast, requires a massive buy-in to a particular
structure and even, on occasion, the sequence in which objects are
declared. You buy into a framework all at once. It is a model for how an
app ought to be built, and you cannot pick and choose among its components.
This is the advantage and the tragedy of frameworks -- and this applies to
every language I have investigated in this respect. It is impossible to use
just a part of any given framework -- let me rephrase -- you can include
the framework and use only 10% of it, and even include another framework
and use only 20% of it... ad nauseum. You end up with a massive bloated
executable 90% of whose code is unused.
I don't want to use ugly words to describe the creators of frameworks; they
are trying to solve problems, which they have experienced in their
development gigs, and address the problems in different ways. But therein
lies the central difficulty: any given framework developer is working from
his or her own experience, and his/her focus is thereby clouded and
narrowed by said experience. It goes further, however, and this is where
frameworks get a tad ugly: inherent in the concept of a framework is the
inner concept of how an app ought to be designed, and that is a truly
serious problem.
In short, these are the reasons why I love libraries and eschew frameworks.
And I say this as a person who has created more than one framework, in more
than one language. I call this scenario "Velvet Handcuffs". And I've
learned my lesson. I will never again try to create a framework, in any of
the several languages I use. Libraries Yes, Frameworks No!

On Wed, Feb 15, 2023 at 11:14 PM John Colby <jwcolby at gmail.com> wrote:

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


-- 
Arthur


More information about the AccessD mailing list