RowSource Property of a Chart

  • Thread starter Thread starter ad3po
  • Start date Start date
A

ad3po

Guest
I am not able to change the RowSource Property of a Chart in a Report. I am able to do it in a form but not in a report.Here is my procedure in a module. I have "UpdateSource" on the OnOpen of my report:

Sub UpdateSource()
Dim sql As String, strBeg As String, strEnd As String, strRange As String

strRange = Forms!frmChart!cboType
strBeg = Forms!frmChart!cboStart
strEnd = Forms!frmChart!cboEnd

sql = "Select [" & strRange & "].FiscalWkYr, [Instock%]*100 As [Instock%_] From [" & strRange & "] "
sql = sql & "Inner Join FISCALCalendar_Linked On [" & strRange & "].FiscalWkYr = "
sql = sql & "FISCALCalendar_Linked.FiscalWkYr Where (((FISCALCalendar_Linked.Date) Between "
sql = sql & "#" & strBeg & "# And #" & strEnd & "#)) Group By [" & strRange & "].FiscalWkYr, "
sql = sql & "[Instock%]*100;"


Reports!rptChart!Graph.RowSource = sql

End Sub

Please Help


[This message has been edited by ad3po (edited 12-19-2001).]
 
Don't know if this would help, but have you tried using something other than "sql" as the variable name?

I wouldn't use something that might be a reserved word. Maybe use strSQL and see if that works.

Might not be the problem, but it might.

Also, are is your [Instock%] really a Field Name or are you looking for a TOP Percent?

Hopefully you haven't used the % within the field name as that will honk things up too.

BL


[This message has been edited by boblarson (edited 12-19-2001).]

[This message has been edited by boblarson (edited 12-19-2001).]
 

Users who are viewing this thread

Back
Top Bottom