[AccessD] Ac2013 running out of resources

David McAfee davidmcafee at gmail.com
Fri Jun 5 12:15:50 CDT 2015


The reason that I open the report in acPreview prior to OutputTo PDF is
because of the WHERE clause that I am using for the report.

By everything I meant the dynamic SQL.
Your method might be faster, but I try to use saved queries when possible.

When I loop through recordsets I'll usually use a hidden form (or hidden
field on a form) to store query parameters.
>From my (bad) memory it looked like you were basically running two
different queries as the source.

One with FY data and one without?

Where do the input parameters for the sub come from? Are they fields on a
form and a button is pressed to run the sub?

How many records does this return?
"SELECT DISTINCT B.ID, B.Name AS [Engagement Manager], B.[first Name]"
as FirstName, B.Email FROM ([User Information List] AS B INNER JOIN [PDR
Tracking] AS A ON B.[ID] = A.[Tax Manager]) LEFT JOIN tblCityRegion ON
B.City = tblCityRegion.City WHERE tblCityRegion.Region=""West"""


How many records does the query "Deliverables by Eng Manager" return if you
return all records (all managers & FY) for the given dates?

Something like
SELECT neededFields
FROM SomeTables
WHERE [Deal Status] like 'Signed*'
AND tblCityRegion.Region='West'
AND [Sign Date] BETWEEN #" & strStartDate & "# AND #" & strEndDate & "#"


Why are you deleting and inserting into tblBatch reports near the end?
Can you just update the record(s) instead of deleting them and reinserting
them with additional data?





On Thu, Jun 4, 2015 at 5:04 PM, Bill Benson <bensonforums at gmail.com> wrote:

> If I don't do it all in VBA, then the user will be stuck sending each
> report individually, no?
>
> Why do you open the report first, what is that accomplishing? I don't see
> any pause occurring in your code, but what happens when you are opening the
> report in preview view?
>
> I don't understand what you are saying regarding changing the WHERE clause
> to a string, is that a way of limiting what the report shows? Isn't that
> what I am accomplishing by editing the query sql?
>
> Would I be better off changing the recordsource for the report, by creating
> a new query each time rather than the same query?
>
> I will try opening the report as you do, then printing it, and then closing
> it - so long as this doesn't interrupt the process.
>
>


More information about the AccessD mailing list