[AccessD] Create a .lib library for use with Access

Jim Dettman jimdettman at verizon.net
Sun Mar 26 09:55:20 CDT 2023


 Really don't know, but I would suspect there is some additional overhead in dealing with two VBA projects and invoking the use of references rather than one using one and no references. 

 On the flip side though, you'd have one bigger VBA project rather than two smaller ones. Internally, that might make some difference.

Jim.

-----Original Message-----
From: AccessD On Behalf Of Bill Benson
Sent: Saturday, March 25, 2023 9:46 PM
To: Access Developers discussion and problem solving <accessd at databaseadvisors.com>
Cc: Jim Dettman <jimdettman at verizon.net>
Subject: Re: [AccessD] Create a .lib library for use with Access

Jim- any impact to performance?  If the VBA in db2 (db referencing db1’s
vbproject) were to run its own code instead, which would likely finish
faster?

I guess I could do an experiment with some loops and UDFs but figured this
might be something you know OTOH.
Tia

On Wed, Mar 22, 2023 at 8:20 AM Jim Dettman via AccessD <
accessd at databaseadvisors.com> wrote:

>
>  FWIW, I prefer to keep a "BaseCode" DB, and just import modules in as
> needed.
>
>  Get's rid of all the hassles with using library DB's (having unique
> function names, worrying about where code is executing, reference, etc).
>  It also let's me control the code better.   If I keep one lib DB, using
> that for every app, if I make a change that will break something, all apps
> that depend on it will break until I can change all of them.  With
> importing, the apps still have the same code until I import the new code
> from BaseCode, at which point, I can make the adjustments.
>
>  Only time I'd use an addin/lib DB, is if it was a utility for a wide
> audience and that's all I was providing.
>
>  To each their own, but this is what I've found works best overall for
> shared code for me.
>
> Jim.
>
> -----Original Message-----
> From: AccessD On Behalf Of Arthur Fuller
> Sent: Tuesday, March 21, 2023 7:38 PM
> To: Access Developers discussion and problem solving <
> accessd at databaseadvisors.com>
> Subject: Re: [AccessD] Create a .lib library for use with Access
>
> Stuart,
>
> Thanks for the link. I read another of his pieces, and learned the solution
> to a completely unrelated issue, as well.
>
> On Tue, Mar 21, 2023 at 6:28 PM Stuart McLachlan <stuart at lexacorp.com.pg>
> wrote:
>
> > Good article here on how to build and use them:
> >
> > https://www.devhut.net/ms-access-library-databases/
> >
> > On 21 Mar 2023 at 11:55, Arthur Fuller wrote:
> >
> > > Thanks, Jim. That's what I thought, but I couldn't remember the file
> > > name extension.
> > >
> > > On Tue, Mar 21, 2023 at 7:36AM Jim Dettman via AccessD <
> > > accessd at databaseadvisors.com> wrote:
> > >
> > > >
> > > > A "lib" file in Access with VBA code is put in a .accda or .mda
> > > > file.
> > > >
> > > > It can include any Access object (tables, forms, reports, etc) and
> > > > have VBA code.
> > > >
> > > > You create it with Access and VBA just as you would normally and
> > > > write VBA code.   Once saved, you then use it in other apps by
> > > > setting a reference to it or using it as an add-in.  This is the way
> > > > all the built-in Wizards work in Access.  The Zoom box for example
> > > > that you get when you hit Shift/F2 is in a library database.
> > > >
> > > > In regards to a .dll or type lib, you create those in something
> > > > else, then either write a DECLARE in your code, or set a reference
> > > > to it in your app, then make calls/use it.   But there's no VBA
> > > > associated with it.
> > > >
> > > > HTH,
> > > > Jim.
> > > >
> > > > -----Original Message-----
> > > > From: AccessD On Behalf Of Arthur Fuller
> > > > Sent: Tuesday, March 21, 2023 5:29 AM
> > > > To: Access Developers discussion and problem solving <
> > > > accessd at databaseadvisors.com>
> > > > Subject: Re: [AccessD] Create a .lib library for use with Access
> > > >
> > > > Ok, I'm wrong. But I thought John Colby has created one, consisting
> > > > of VBA code. Maybe I misunderstood; it wouldn't be the first time.
> > > > But I was given to understand that one could collect a bunch of
> > > > reusable code and package it. Maybe John meant that he references
> > > > it, although if it's not a .Lib file or a .DLL, then I have no clue
> > > > as to how one might reference it. It seems a shame to gather all
> > > > that reusable code and then have to import it into the next app one
> > > > is going to write. But I guess if that's what's required, ok, I'll
> > > > do it that way. Creating an Add-In seems totally wrong. (Actually, I
> > > > am creating an Add-In, but it has a form as well as some modules, so
> > > > that's quite another kettle of fish; easy enough to implement,
> > > > though.
> > > >
> > > > On Tue, Mar 21, 2023 at 3:47AM Stuart McLachlan
> > > > <stuart at lexacorp.com.pg> wrote:
> > > >
> > > > > How do you expect to use a .lib file in Access?
> > > > >
> > > > > If we are talking about same thing, a .lib is a file which is
> > > > > statically linked  into an application at compile time. (And
> > > > > that's a realy compile to a .exe file - not what Access does with
> > > > > VBA code)
> > > > >
> > > > > It's essentailly the same as a DLL wrapped inside an executable
> > > > > file.
> > > > >
> > > > >
> > > > >
> > > > > On 21 Mar 2023 at 2:35, Arthur Fuller wrote:
> > > > >
> > > > > > I'm having lousy luck searching for this. I keep getting hits
> > > > > > that tell me how to create a library database, not a .lib file.
> > > > > >
> > > > > > Suggestions?
> > > > > >
> > > > > > --
> > > > > > Arthur
> > > > > > --
> > > > > > 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
> > > > >
> > > >
> > > >
> > > > --
> > > > Arthur
> > > > --
> > > > 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
> > > >
> > >
> > >
> > > --
> > > Arthur
> > > --
> > > 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
> >
>
>
> --
> Arthur
> --
> 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
>
-- 
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