Hi Experts; I could really use some help. I thought if I used a pass through query as a recordset would make my code run faster -- not working...
The SQL table has a million records and I would like to limit the recordset to just a single ID# which might mean 3 or 4 records will be returned.
Table has a MainID key (numeric)
As the user selects a MainID, I want to limit the records returned to those that match the MainID -- and then run through the remaining code -- which runs very fast -- the search to locate the MainID takes up to 10+ seconds.
I need to speed this up. The Passthrough query contains links between 3 related tables and I thought that having one single source would work best for my purposes.
So instead of using the below I'm looking for some advice on how to restructure and improve performance.
Dim rsFINAN As DAO.Recordset
Set rsFINAN = CurrentDb.OpenRecordset("qry_PassThruClientDebtFinance", dbOpenDynaset)
strFCriteria = "[MainID] = " & lngBNo
rsFINAN.FindFirst strFCriteria <<<<<<<<<<<<<<<<<<<<<<<<<<<10+ seconds......
If rsFINAN.NoMatch = False Then
Thanks a lot for any help you can provide - as always.