View Single Post
Old October 30th, 2009, 04:58 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
Posts: 8,621
Default Is my query at fault for a slow form?

If I'm reading your SQL correctly, you want the form to "hold" all the
"salesorder + clients + country" data for all records with a datereceived
between the first of the current month and the first of two months from now.

I can't see your database, so I don't know if that's likely to be 10 records
or 10,000 or 10,000,000.

I also wonder why you are looking for records that have a date
(datereceived) up to two months in the future. How can you receive an order
in the future?

Have you tried running just a query, to see if the query is slow (vs. how
long the FORM takes)?

Have you checked the underlying tables to ensure that they have indexes on
every field used for joins, selection criteria, and sorting?

Good luck!


Jeff Boyce
Microsoft Access MVP

Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer

"jenniferspnc" wrote in message
It never fails, I build my database to the best of my abilities, and once
split things move terribly slow. So I once again come for assistance.
going through the steps of things to improve speed (persistent connection,
track name auto correct to "no", shorten BE name and not placed several
folders down.

I was hoping someone could look at the SQL of my query (tied to the form)
see if anything might causing the form to take 40 seconds to load. Once
it tends to move relatively quicker (well, two very slow combo boxes which
I'm looking into).

SELECT tbl_salesorder.Sales_Order, tbl_salesorder.Client_ID,
tbl_salesorder.Country_ID, tbl_salesorder.Denied_Party_List_Date,
tbl_salesorder.Status, tbl_clients.Client, tbl_country.Countries,
tbl_salesorder.Reviewer_Name, tbl_salesorder.Comments,
tbl_salesorder.[Date_Approved/Denied], tbl_salesorder.Date_Received
FROM tbl_country INNER JOIN (tbl_clients INNER JOIN tbl_salesorder ON
tbl_clients.Client_ID = tbl_salesorder.Client_ID) ON
tbl_country.Country_ID =
WHERE (((tbl_salesorder.Date_Received) Between
DateSerial(Year(Date()),Month(Date()),1) And
ORDER BY tbl_salesorder.Date_Received;