473,385 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Print updated pivot chart report (Macro or VBA)

3
Hi,

Has anyone come across a print report macro that updates any changes you make on a main form?

The issue I have is I have a pivot chart called [frmMIN_PivotChart]

It is a sub form in the main form [frmMain]

I have a cammand button that prints the report [rptMIN]

However when you make changes to [frmMIN_PivotChart] on [frmMain] and hit the command button it does not print the changes.

I made the initial macro to code below, can I do it in a macro or can I alter the code below?

Private Sub cmdPrintMin_Click()
On Error GoTo Err_cmdPrintMin_Click

Dim stDocName As String

stDocName = "rptMIN"
DoCmd.OpenReport stDocName, acNormal

Exit_cmdPrintMin_Click:
Exit Sub

Err_cmdPrintMin_Click:
MsgBox Err.Description
Resume Exit_cmdPrintMin_Click

End Sub
Mar 18 '08 #1
1 3105
PianoMan64
374 Expert 256MB
Hi,

Has anyone come across a print report macro that updates any changes you make on a main form?

The issue I have is I have a pivot chart called [frmMIN_PivotChart]

It is a sub form in the main form [frmMain]

I have a cammand button that prints the report [rptMIN]

However when you make changes to [frmMIN_PivotChart] on [frmMain] and hit the command button it does not print the changes.

I made the initial macro to code below, can I do it in a macro or can I alter the code below?
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdPrintMin_Click()
  2. On Error GoTo Err_cmdPrintMin_Click
  3.  
  4. Dim stDocName As String
  5.  
  6. stDocName = "rptMIN"
  7. DoCmd.OpenReport stDocName, acNormal
  8.  
  9. Exit_cmdPrintMin_Click:
  10. Exit Sub
  11.  
  12. Err_cmdPrintMin_Click:
  13. MsgBox Err.Description
  14. Resume Exit_cmdPrintMin_Click
  15.  
  16. End Sub
  17.  
The reason your changes don't print, you have to be able to make the changes on the pivot table that is in the report. the one on the form is a separate piviot table. If you're wanting to make changes to the piviot table in the Access Report, you'll need to make the changes in code, then after that is completed and rendered, then you can print it out.

If you need a more detailed answer, I would have to have you post the report and the table schema and queries and forms that you have and how you have it setup.

Hope that helps,

Joe P.
Mar 19 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: DAL | last post by:
I have created a Pivot Chart that Graphs our orders per month and what type of order they are, either Custom or Standard. To get the data we use an input Form the uses a Combo Box to choose either...
2
by: Saintor | last post by:
Anybody is using them? I have not found much infos so far... Do I have to pass through a form? Any clue will help. TIA.
3
by: StBond | last post by:
Hi everyone, I am new to Access and Visual Basic so things my be getting across a bit cloudy. I only started using VB for one week. I am having a little problem with the database that I am...
3
by: GoalieGW | last post by:
Does anyone know how to create a Pivot Chart at run-time? I have a database of meter readings that currently requires me to have 200 forms created so the user can enter date criteria and have a...
2
by: KidSlyce | last post by:
I have recently read that a more efficient way to display your Pivot Chart is by creating a report and embedding the Pivot Chart in a subform in the report. I am trying to create a basic form...
1
by: thomas.wordsworth | last post by:
This is a bit of a two-part question. 1. Is there a way to control what filters are placed on a pivot chart via vba. I can easily change the underlying query and refresh pivot chart but it's...
6
by: Dave | last post by:
On my form I have combo boxes. These combo boxes, after updating them, populate respective listboxes that are located below the combo boxes on the same form. I am trying to use a "generate...
0
by: tambourine63 | last post by:
Hi all! I have a report that runs by supervisor, service manager, or division manager. To me, the report is built strangely because the only way I could get it to total up correctly was to put...
1
by: CoreyReynolds | last post by:
I can't find any information on this. If I have an existing query and I want to dump it into a page on a spread sheet and modify it as a pivot table all in VBA, can I do that? I only have the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.