Single query or multiple queries?????

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'm trying to find out which is better - single query for multiple forms
with slight differences or query for each form? For example, I have
table tGenInfo,
query qGenInfo,
form fGenInfoRepair and
form fGenInfoManufacturing, and
formfGenInfoPackaging.

All forms are set up pretty much with the same fields - job number, contact,
customer, etc., but each one also has some slightly unique fields.

Should I just make one big query to accommodate all fields for each form or
have multiple queries with repeating info for each form?
If I should make multiple queries for each form, will this cause concern for
db size?
By the way, multi-user split database.

Thanks in advance for any help,
Pam
 
A query goes against tables not forms.
If your different forms get their data from the same table but require
different data, create a separate query for each. It's inefficient to read
any data that is not required for the specific form. A query should not take
up much storage.

Dorian
 
Dorian,
Thank you for the reply and info.

Pam
mscertified said:
A query goes against tables not forms.
If your different forms get their data from the same table but require
different data, create a separate query for each. It's inefficient to read
any data that is not required for the specific form. A query should not take
up much storage.

Dorian
 
Should I just make one big query to accommodate all fields for each form or
have multiple queries with repeating info for each form?

Multiple queries.
If I should make multiple queries for each form, will this cause concern for
db size?

No. The Query is under 64 KBytes (any bigger and you'll get a
query-too-complex error) in any case, regardless of how many records or how
much data it retrieves.

John W. Vinson [MVP]
 
Thanks, John, for the reply and info on query size. I have one more
question, if you don't mind. Which is best to use - queries with grid or sql
statement based on table for form recordsource or is it only a matter of
personal preference?

Pam
 
All query builder queries are converted to SQL so it makes no difference.

I like to think I can create more efficient queries that the builder can
though I've never run tests to prove it. Certainly you can build some queries
in SQL that the builder cannot build.

Dorian
 
Thanks, John, for the reply and info on query size. I have one more
question, if you don't mind. Which is best to use - queries with grid or sql
statement based on table for form recordsource or is it only a matter of
personal preference?

The grid is *simply a tool* to create SQL. The SQL is the "real" query, and
Access doesn't care a bit whether it was created from the grid or from the
keyboard. It's the same query either way.

John W. Vinson [MVP]
 
Back
Top