[AccessD] Custom totals

Wortz, Charles CWortz at tea.state.tx.us
Mon Jul 21 11:59:14 CDT 2003


Bobby,

As you are learning, the Format event is not the proper place for code
that needs to execute only once since it gets executed by both Preview
and Print.

Charles Wortz
Software Development Division
Texas Education Agency
1701 N. Congress Ave
Austin, TX 78701-1494
512-463-9493
CWortz at tea.state.tx.us



-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bobby Heid
Sent: Monday 2003 Jul 21 11:50
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Custom totals

Yes, I believe so.  I am using the formatcount variable and only running
the code when the count=1.  Basically, it appears that Access is running
the report twice, but not initializing all items.

BTW, I am using Acc 97 here on WIn2K.  BUT!  We may have finally talked
the client into using Acc XP.

Bobby

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Wortz, Charles
Sent: Monday, July 21, 2003 12:00 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Custom totals


Bobby,

The code in the Format event is probably the culprit since it has to
format the report for both previewing and printing.

Charles Wortz
-----Original Message-----
From: Bobby Heid [mailto:bheid at appdevgrp.com] 
Sent: Monday 2003 Jul 21 10:57
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Custom totals

Hey,

Yes we do.  There are 5 "tiers" on the report to be used in place of the
detail line.  We have code in the Format, Print, and Retreat headers for
all of the tiers.  
There is also a project header and footer and footers for 1st 2 of the
"tiers" mentioned above.  All of these have code in the footers (for the
totals).

The report runs correctly when printed straight and when just previewed.

My problem is where to re-initialize my local variables that are used
for totals when printing from the preview?

Thanks,
Bobby

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Bob Heygood
Sent: Monday, July 21, 2003 11:21 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Custom totals


Do you have any code behind the report? if so, in what event.

Bob Heygood


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Bobby Heid
Sent: Monday, July 21, 2003 8:12 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Custom totals


Hi,

We have this one report that keeps up with it's own totals/sub totals.
It works great if you preview it or just print it.  But when you preview
then print from the preview, the totals are doubled.  

It appears that the totals are not being zeroed out when printing from
the preview.  I have tried initializing the counters in various places
and have not found a solution.

Anyone have any ideas?

Thanks,
Bobby


More information about the AccessD mailing list