R
Rob Parker
I'm not a newbie to this (my history in the Access newsgroups will confirm
this) but now I find myself stumped. And incredibly frustrated - this
shouldn't be so hard, or fail to work as it's doing for me.
I have a report, which contains a chart (an object with OLE Class =
"Microsoft Graph Chart"). The report has a Record Source of
"qryPhasedCommitSpendFY_CA" ; the chart has the same query as its Row
Source. When I attempt to link the chart to the report, via the Field
Linker dialog accessed from the LinkChild Fields or Link Master Fields on
the chart object property dialog, I receive a message "Can't build a link
between unbound forms". Why can't I link the chart to the report in this
manner? Or, more to the point, how can I get the chart to be linked to the
report?
It seems that the only way I can get a chart linked to the report is to
create it via the wizard; however, that screws up the Row Source I want, and
converts it to a crosstab query (under the covers). If I do that, and then
change the Row Source for the chart to what I want (and not what Microsoft
thinks I want), nothing shows in my chart; the links are useless.
If I leave the chart as an unbound object, and try to set the records which
it returns by modifying the Row Source to use parameters from the report
(ie. set criteria in the Row Source to include a criteria such as "WHERE CA
= [reports].[rptPhasings].[CA]"), I still get nothing in the chart - its Row
Source returns no records.
In my efforts to solve this, I did at one point have this last approach
working with a single criterion fiield; however, my criteria actually
involve two fields, and when I added the second one everything went to hell
in a hand-basket, and I haven't been able to get back to that point since.
Details:
qryPhasedCommitSpendFY_CA returns the following fields:
FY
CA
CAName
Dataset
MnthYr
Phased
Commit
Spend
ProRata
The report is opened via a DoCmd.OpenReport which has "FY = " &
Forms("frmPhasings").Controls("cboxSelectFY") in its Where parameter - the
value is correct.
The report has groupings for FY and CA (in that order). The FY field is
bound to a textbox (currently visible, but will be hidden) in the FY Group
Header, and the CA and CAName fields are bound to textbox controls in the CA
Group Header. The chart is also in the CA group header.
Finally, I have the following statement in the CAHeader_Format event:
Me.Controls("chtPhasings").ChartTitle.Text = "Phased Commit & Spend -
" & Me.CAName
which is also throwing an error (using either Me.CAName or Me.txtCAName).
Again, this worked at one point.
I've tried Me.chtPhasings .Refresh and Me.chtPhasings.Requery statements in
the CA Group Header format and print events, to no avail.
Help desperately needed - my head is getting very sore from banging it
against the wall ;-)
TIA,
Rob
this) but now I find myself stumped. And incredibly frustrated - this
shouldn't be so hard, or fail to work as it's doing for me.
I have a report, which contains a chart (an object with OLE Class =
"Microsoft Graph Chart"). The report has a Record Source of
"qryPhasedCommitSpendFY_CA" ; the chart has the same query as its Row
Source. When I attempt to link the chart to the report, via the Field
Linker dialog accessed from the LinkChild Fields or Link Master Fields on
the chart object property dialog, I receive a message "Can't build a link
between unbound forms". Why can't I link the chart to the report in this
manner? Or, more to the point, how can I get the chart to be linked to the
report?
It seems that the only way I can get a chart linked to the report is to
create it via the wizard; however, that screws up the Row Source I want, and
converts it to a crosstab query (under the covers). If I do that, and then
change the Row Source for the chart to what I want (and not what Microsoft
thinks I want), nothing shows in my chart; the links are useless.
If I leave the chart as an unbound object, and try to set the records which
it returns by modifying the Row Source to use parameters from the report
(ie. set criteria in the Row Source to include a criteria such as "WHERE CA
= [reports].[rptPhasings].[CA]"), I still get nothing in the chart - its Row
Source returns no records.
In my efforts to solve this, I did at one point have this last approach
working with a single criterion fiield; however, my criteria actually
involve two fields, and when I added the second one everything went to hell
in a hand-basket, and I haven't been able to get back to that point since.
Details:
qryPhasedCommitSpendFY_CA returns the following fields:
FY
CA
CAName
Dataset
MnthYr
Phased
Commit
Spend
ProRata
The report is opened via a DoCmd.OpenReport which has "FY = " &
Forms("frmPhasings").Controls("cboxSelectFY") in its Where parameter - the
value is correct.
The report has groupings for FY and CA (in that order). The FY field is
bound to a textbox (currently visible, but will be hidden) in the FY Group
Header, and the CA and CAName fields are bound to textbox controls in the CA
Group Header. The chart is also in the CA group header.
Finally, I have the following statement in the CAHeader_Format event:
Me.Controls("chtPhasings").ChartTitle.Text = "Phased Commit & Spend -
" & Me.CAName
which is also throwing an error (using either Me.CAName or Me.txtCAName).
Again, this worked at one point.
I've tried Me.chtPhasings .Refresh and Me.chtPhasings.Requery statements in
the CA Group Header format and print events, to no avail.
Help desperately needed - my head is getting very sore from banging it
against the wall ;-)
TIA,
Rob