[AccessD] Create a .lib library for use with Access
Jim Dettman
jimdettman at verizon.net
Tue Mar 21 06:36:05 CDT 2023
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:47 AM 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
More information about the AccessD
mailing list