Code problem on sub total page in Access (1 Viewer)

tgpr52

New member
Joined
Nov 9, 2019
Messages
4
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
 

theDBguy

I’m here to help
Joined
Oct 29, 2018
Messages
7,701
Hi. Welcome to AWF!
 

tgpr52

New member
Joined
Nov 9, 2019
Messages
4
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?
 

isladogs

CID Moderator
Staff member
Joined
Jan 14, 2017
Messages
12,338
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.
 

jdraw

Super Moderator
Staff member
Joined
Jan 23, 2006
Messages
12,560
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
 

tgpr52

New member
Joined
Nov 9, 2019
Messages
4
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.
 

theDBguy

I’m here to help
Joined
Oct 29, 2018
Messages
7,701
Hi. It's hard to say without seeing what you got. Are you able to share it?
 

tgpr52

New member
Joined
Nov 9, 2019
Messages
4
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?
 

theDBguy

I’m here to help
Joined
Oct 29, 2018
Messages
7,701
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom