suvmitra
asked on
MS Access 2003 Chart VBA
Hi,
I want the VBA procedures to edit this chart Object in MS Access 2003.
I need to modify the Chart Title, Legend Name etc on the Form Load event.
1.JPG
I want the VBA procedures to edit this chart Object in MS Access 2003.
I need to modify the Chart Title, Legend Name etc on the Form Load event.
1.JPG
private sub form_load()
if me.graphName.hastitle then
me.graphName.charttitle.te xt = "My Title"
end if
end sub
if me.graphName.hastitle then
me.graphName.charttitle.te
end if
end sub
for the Legend, you have to do that in the SQL statement of the rowsource of your graph.
ASKER
I am not able to find any graphName object. But If I can edit in runtime the Form - datasheet .. then my objective fullfills..is that possible to change values of the datasheet in runtime? How?
graphName - you have to change this with the actual name of your graph.
ASKER
I have OLE Class as Microsoft Graph Chart
Name as OLEUnbound0
Name as OLEUnbound0
ASKER
I am trying the below query but it is not working, can you suggest?
SELECT [Index],Sum([P1]) AS [forms]![Form_frmMain]![tx tD7]
SELECT [Index],Sum([P1]) AS [forms]![Form_frmMain]![tx
where is your graph located? in form frmMain?
ASKER
No my graph is located on Form1 ; but I am opening frmMain, from frmMain I am opening frmReports, from frmReports I am opening frmCharts and from frmCharts I am opening Form1,
post the rowsource SQL of the graph.
ASKER
the below is the default SQl, but I need to modify the [SumOfP1] with some text box data I have stored in the frmMain.
SELECT [Index],Sum([P1]) AS [SumOfP1],Sum([P2]) AS [SumOfP2] FROM [tblSlide6A5] GROUP BY [Index];
SELECT [Index],Sum([P1]) AS [SumOfP1],Sum([P2]) AS [SumOfP2] FROM [tblSlide6A5] GROUP BY [Index];
what is the name of the second textbox, the first one is txtD7. is this correct?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
Every thing is fine now..but I need one more thing to know. In the X Axis (look at the picture) there are values like 13, 14, 15 which I want to replace as 13= jan, 14 = Feb like ways .. can you please further guide me to accomplish that? Many thanks!
Every thing is fine now..but I need one more thing to know. In the X Axis (look at the picture) there are values like 13, 14, 15 which I want to replace as 13= jan, 14 = Feb like ways .. can you please further guide me to accomplish that? Many thanks!
ASKER
Thank you.
ASKER