acSelection (1 Viewer)

SpentGeezer

Pure Noobism
Local time
Tomorrow, 07:00
Joined
Sep 16, 2010
Messages
258
Does anyone know the VBA to make a subform the "acSelection"
 

boblarson

Smeghead
Local time
Today, 14:00
Joined
Jan 12, 2001
Messages
32,059
What do you mean the "acSelection?" In what context? It isn't clear what you are wanting.
 

SpentGeezer

Pure Noobism
Local time
Tomorrow, 07:00
Joined
Sep 16, 2010
Messages
258
Basically I want to select it with VBA code then use this to print it (the subform PivotChart)

Code:
DoCmd.PrintOut acSelection, 1, 1, acHigh, 1

The PivotChart is embeded as a subform in the form. User clicks print button then something like this:

Code:
acselection = me.frm_subFormPivot
DoCmd.PrintOut acSelection, 1, 1, acHigh, 1
 

boblarson

Smeghead
Local time
Today, 14:00
Joined
Jan 12, 2001
Messages
32,059
Sorry, not gonna happen with acSelection. I'm not sure what is the course of action to be able to do what you are wanting. Perhaps openi the subreport by itself and pass it the main form criteria??? I don't know.
 

SpentGeezer

Pure Noobism
Local time
Tomorrow, 07:00
Joined
Sep 16, 2010
Messages
258
Sorry, not gonna happen with acSelection. I'm not sure what is the course of action to be able to do what you are wanting. Perhaps openi the subreport by itself and pass it the main form criteria??? I don't know.

How do I pass the main form criteria? Basically I think I am going to have to create a seperate form with all the options that are available on the pivotchart (e.g Textbox to put axis title, checkboxes for which fields etc..) Then the user can click a button to update the subform PivotChart from these criteria. Once they have the chart looking sweet they can press another button that opens a report containing the pivot chart and update it with the criteria. Then printout or save to JPEG.

What a lot of work......I was trying to avoid this by simply printing out the subform PivotChart from the original form.
 

SpentGeezer

Pure Noobism
Local time
Tomorrow, 07:00
Joined
Sep 16, 2010
Messages
258
No Spent, that would be silly. You could have the user pivot the chart in the subform then click the print or save button which assigns all the chart properties to variables and passes them to the Pivot Chart report for printout.
 

SpentGeezer

Pure Noobism
Local time
Tomorrow, 07:00
Joined
Sep 16, 2010
Messages
258
Getting through it now. So far I have this:

Code:
Set frm = Forms.frm_MM_Quantities.qry_Quantities.Form
theTITLE = frm.ChartSpace.ChartSpaceTitle.Caption
xAXIS = frm.ChartSpace.Charts(0).Axes(0).Title.Caption 
yAXIS = frm.ChartSpace.Charts(0).Axes(1).Title.Caption

Now for the tricky stuff......

When I have all the properties then I will open the PC in a report and assign all these properties to it. Then printout the report.
 

SpentGeezer

Pure Noobism
Local time
Tomorrow, 07:00
Joined
Sep 16, 2010
Messages
258
Does anyone have an Access OMD? WOuld be very much appreciated..
 

Users who are viewing this thread

Top Bottom