Experts,
I have the following view:
CREATE VIEW dbo.vwQtrlySupContact
AS
SELECT Casenotes_Tbl.PROBATION_OF
FICER, Case_Tbl.CASE_NUMBER, Employee_Lkup_Tbl.TEAM, 1 AS [Count], Casenotes_Tbl.CONTACT_TYPE
, Casenotes_Tbl.TODAYS_ENTRY
_DATE, Casenotes_Tbl.CaseNoteNo, Case_Tbl.ClientID
FROM Employee_Lkup_Tbl INNER JOIN (Case_Tbl INNER JOIN Casenotes_Tbl ON Case_Tbl.SupNo = Casenotes_Tbl.SupNo) ON Employee_Lkup_Tbl.FULL_NAM
E = Casenotes_Tbl.PROBATION_OF
FICER
I have the following query in Access:
SELECT vwQtrlySupContact.PROBATIO
N_OFFICER,
vwQtrlySupContact.CASE_NUM
BER, Forms![Main Page]![Qtrly Supv Main Form].Form![Period Begin Date] AS [Report Start], Forms![Main Page]![Qtrly Supv Main Form].Form![Period End Date] AS [Report End], vwQtrlySupContact.TEAM, vwQtrlySupContact.Count, vwQtrlySupContact.CONTACT_
TYPE, vwQtrlySupContact.TODAYS_E
NTRY_DATE,
vwQtrlySupContact.CaseNote
No
FROM vwQtrlySupContact
GROUP BY vwQtrlySupContact.PROBATIO
N_OFFICER,
vwQtrlySupContact.CASE_NUM
BER, Forms![Main Page]![Qtrly Supv Main Form].Form![Period Begin Date], Forms![Main Page]![Qtrly Supv Main Form].Form![Period End Date], vwQtrlySupContact.TEAM, vwQtrlySupContact.Count, vwQtrlySupContact.CONTACT_
TYPE, vwQtrlySupContact.TODAYS_E
NTRY_DATE,
vwQtrlySupContact.CaseNote
No
HAVING (((vwQtrlySupContact.TEAM)
=[Forms]![
Main Page]![Qtrly Supv Main Form].[Form]![Team Combo]) AND ((vwQtrlySupContact.TODAYS
_ENTRY_DAT
E)>=[Forms
]![Main Page]![Qtrly Supv Main Form].[Form]![Period Begin Date] And (vwQtrlySupContact.TODAYS_
ENTRY_DATE
)<=[Forms]
![Main Page]![Qtrly Supv Main Form].[Form]![Period End Date]));
When I run the query, I get an ODBC error. I believe it is happening because the query takes too long to run. I have already made sure that all of the join and condition fields are indexed. I'm not sure what to do at this point.
When I run open the view from within QA, it returns approx 2.8 million records.
Any and all ideas are appreciated. TIA!
Start Free Trial