8 Querry inside 1 - Can i Simplify?

Alloyd

Registered User.
Local time
Yesterday, 16:02
Joined
Feb 1, 2006
Messages
15
I have a table with the following fields:

Record_No <--- This is an autonumber field
Est_COE --Date Field Type
DATE_DOCR
DATE_Followup
Progress

I then have used multiple querries that just count records based off of Status:

Example of one of the querry's:
SELECT Count(borrower.Record_Number) AS Close_Of_Escrow
FROM borrower
WHERE (((borrower.Est_COE) Between Date() And (Date()+7)) AND ((borrower.Progress)="active"));

Another Example of one other querry:
SELECT Count(Borrower_Journal_Notes.ID) AS Followups_Not_Done
FROM Borrower_Journal_Notes
WHERE (((Borrower_Journal_Notes.Follow_Up_date)>Date()) AND ((Borrower_Journal_Notes.Followed_Up_Complete) Not Like -1));

Then I put both these querry's into a another querry so i can get the data put into a single form using one record source. (The master querry)

Is there a easier way of doing this because it takes 8 querry's using the same table just using differnt parameters to get the data onto a subform. Any sugestions would help or if this is the only way to do it... please let me know.

Respectfully,
alloyd
 
You could use DCount() instead of a query, but that won't of itself make things much simpler. Are you having a problem, or is it just a belief that things could be simpler?
 
Are there some common factors &/or expressions in your queries? If so, they could be the means of simplifying things (either by still using just queries, or by using variables & SQL statements in code).
 
The way it works now is great.
I just wanted to ensure that I am doing things right and not making a ton of extra work on myself. Each querry does have an expression based off if something is checked or if a data range is in place. I never thought to use Dcount() as an option but I am still not sure if it would be a good one.

From what I have found this might be the best option by doing multiple querrys then placing them inside one. I saw some querrys in other samples I have stripped out and where they had a union select and whatever options (WAY over my head) and it looked like it was doing everything mine was capable of doing. My project I am working on I want to box it up and sell it here eventually, but I dont want it to seem a mess by having too many querry's, tables, etc... :cool:

Thanks.... Alloyd
 

Users who are viewing this thread

Back
Top Bottom