Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-08-2019, 05:32 PM   #1
tgpr52
Newly Registered User
 
Join Date: Nov 2019
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
tgpr52 is on a distinguished road
Code problem on sub total page in Access

Dim GlobalFlagR As Variant

Dim x As Double
Dim y As Double
Dim z As Double

Option Compare Database
Option Explicit

Private Sub Detail_Print(Cancel As Integer, FormatCount As Integer)

End Sub

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)

End Sub

Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
pagesum = runsum - x (<THIS IS THE ERROR I GET - runtime error '2427')
x = runsum

pagesum1 = runsum1 - y
y = runsum1

pagesum2 = runsum2 - z
z = runsum2

End Sub

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)

End Sub

tgpr52 is offline   Reply With Quote
Old 11-08-2019, 10:32 PM   #2
NauticalGent
Pristine Curmudgeon
Gold Supporter
 
NauticalGent's Avatar
 
Join Date: Apr 2015
Location: Naples, Italy (EXPAT from Virginia)
Posts: 2,026
Thanks: 455
Thanked 302 Times in 261 Posts
NauticalGent has a spectacular aura about NauticalGent has a spectacular aura about NauticalGent has a spectacular aura about
Re: Code problem on sub total page in Access

Going to need a little more information here...
__________________
ďIt follows then as certain that night succeeds the day, that without normalization, we can do nothing definitive, and with it, everything honorable and glorious.Ē - with apologies to George Washington
NauticalGent is offline   Reply With Quote
Old 11-08-2019, 10:38 PM   #3
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,570
Thanks: 58
Thanked 1,437 Times in 1,418 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Code problem on sub total page in Access

Hi. Welcome to AWF!

__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 11-09-2019, 05:11 AM   #4
tgpr52
Newly Registered User
 
Join Date: Nov 2019
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
tgpr52 is on a distinguished road
Re: Code problem on sub total page in Access

Quote:
Originally Posted by NauticalGent View Post
Going to need a little more information here...
Moved data from windows 7 to 10. Running Access 2016. This script error pops up when I run a report.

It happens after I enter a date range. Also the page total works pagesum1 but pagesum2 doesnít because I multiply pagesum1 times $6 and I need to change it to $20 and canít find the 6.

What specifics do you need?
tgpr52 is offline   Reply With Quote
Old 11-09-2019, 05:39 AM   #5
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,308
Thanks: 115
Thanked 3,095 Times in 2,813 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Code problem on sub total page in Access

I've read this several times and haven't a clue what this means. You have 3 empty procedures and an OnPrint procedure that includes several undefined variables. Where do any of the values get defined? What are you actually trying to do?
Have you checked what error 2427 means?

If you want help, you're going to need to explain your situation and intent clearly.
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Common sense and a sense of humour are the same thing, moving at different speeds. (Clive James - RIP)
isladogs is offline   Reply With Quote
Old 11-09-2019, 05:49 AM   #6
jdraw
Super Moderator
 
jdraw's Avatar
 
Join Date: Jan 2006
Location: Ottawa, Ontario, Canada;West Palm Beach, Florida
Posts: 12,283
Thanks: 96
Thanked 2,031 Times in 1,978 Posts
jdraw is a glorious beacon of light jdraw is a glorious beacon of light jdraw is a glorious beacon of light jdraw is a glorious beacon of light jdraw is a glorious beacon of light
Re: Code problem on sub total page in Access

tgpr52,

As others have advised -- please provide
-an overview in English describing the gist of the application
-details on the report (source data, calculations, error messages..)
- a copy of the database with enough info to repeat the issue
-compact repair and zip
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jdraw is offline   Reply With Quote
Old 11-09-2019, 08:37 AM   #7
tgpr52
Newly Registered User
 
Join Date: Nov 2019
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
tgpr52 is on a distinguished road
Re: Code problem on sub total page in Access

Thank you.

First of all I want to thank those who responded to my vague thread regarding a report problem error code 2742. I seem to have resolved it myself, heaven only knows how since I'm totally unfamiliar with visual basic.

Although I've solve my error problem and am now able to print my report I still can't find where I set up the calculation for pagesum2 (to be pagesum1 times $6) . I need to find it so I can change it to times $20.

Any hints as to where I may have done this. BTW I set this up over 20 years ago and have forgotten anything I knew about Visual basic, and for that matter programming in Access. I do ok on report and screen set ups but the back end stuff confuses me.

Thanks for any help or direction.

tgpr52 is offline   Reply With Quote
Old 11-09-2019, 08:48 AM   #8
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,570
Thanks: 58
Thanked 1,437 Times in 1,418 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Code problem on sub total page in Access

Hi. It's hard to say without seeing what you got. Are you able to share it?
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Old 11-09-2019, 02:57 PM   #9
tgpr52
Newly Registered User
 
Join Date: Nov 2019
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
tgpr52 is on a distinguished road
Re: Code problem on sub total page in Access

Sorry, the information in the data base is proprietary and I can’t share it.

Any idea where I would of did a calculation in the report page footer to multiply pagesum1 to get pagesum2?
tgpr52 is offline   Reply With Quote
Old 11-09-2019, 03:29 PM   #10
jdraw
Super Moderator
 
jdraw's Avatar
 
Join Date: Jan 2006
Location: Ottawa, Ontario, Canada;West Palm Beach, Florida
Posts: 12,283
Thanks: 96
Thanked 2,031 Times in 1,978 Posts
jdraw is a glorious beacon of light jdraw is a glorious beacon of light jdraw is a glorious beacon of light jdraw is a glorious beacon of light jdraw is a glorious beacon of light
Re: Code problem on sub total page in Access

See the info at this thread and post re Randomizing/Anonymizing data on a copy of your database.
As has been mentioned --it's difficult to advise without seeing the real data.

Readers only need enough info to show the problem --not the entire database.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jdraw is offline   Reply With Quote
Old 11-09-2019, 03:33 PM   #11
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 6,570
Thanks: 58
Thanked 1,437 Times in 1,418 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Code problem on sub total page in Access

Quote:
Originally Posted by tgpr52 View Post
Sorry, the information in the data base is proprietary and I canít share it.

Any idea where I would of did a calculation in the report page footer to multiply pagesum1 to get pagesum2?
Hi. What exactly is "proprietary" about it? If only the data, then we don't need to see it. Just put in some test/dummy equivalents. If the db design is proprietary, then I suppose it will be really hard to offer anything useful to you, since it could be using unorthodox methods.

__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is offline   Reply With Quote
Reply

Tags
runtime error 2427

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
need to view the total on second page if 1st page is full with detail rehanemis Reports 5 01-08-2017 02:18 AM
Totals for each page, grand total at the bottom of last page Alex Righolt Reports 1 12-13-2009 01:22 PM
Access Sub-Total Function Code 4 u rich.barry Code Repository 0 07-16-2008 01:47 PM
Problem with VB code printing an extra page stanger1 Modules & VBA 4 01-31-2005 06:03 AM
Problem with the Code Page yoavchen Modules & VBA 0 01-30-2005 11:45 PM




All times are GMT -8. The time now is 07:22 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World