Best way to set form's recordsource

T

Tony

Hi All,

Just fishing for opinions here... Do you consider it a better practice to
create a query to use as a form's recordsource, or do you build it from the
form's properties dialog. Usually I create a query but I'm one of those
anal people who fret over then number of objects in my DBs. Does it really
matter, since setting from the form's properties creates a system table
entry? Probably not a big deal, but I want to make sure I'm doing the right
thing.

Thanks & Ciao
 
A

Arvin Meyer [MVP]

Creating a query is self-documenting. Queries are compiled and used
repeatedly until a database is compacted, then they are recompiled on first
use. SQL statements in forms are compiled and cached only for that session.
So, IMO, saved queries are preferable because they are typically faster and
they are self documenting (if you name the query something like:
qryfrmCustomers).
 
T

Tony

Arvin,

Thanks for the response. It raises another question for me. Is there any
hard limit to the number of objects in a database? (Acc2K or 2K3)

Thanks,

Tony
 
K

Klatuu

The limit on number of objects is 32,768
You can find other related info in Access Help under Specifications
 
T

Tony

Dave,

Thanks for the reply & the info. I don't think I'll be approaching that
limit any time soon...

Ciao
 
A

Arvin Meyer [MVP]

Thanks for the reply & the info. I don't think I'll be approaching that
limit any time soon...

And there are a few tricks in using code and object libraries that allow
even more than 32.768 objects if you really need them.
 
K

Klatuu

True, but that would be one really big application to have that many objects.
Code libraries can be cool if you have a collection of generic functions
that can be used in any app.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top