Can't update the Report - Datasheet (Graphs)

nowanda

Board Regular
Joined
May 27, 2002
Messages
67
Hello all!

I'm trying to re-use a report for graphs with the same general x-axis labels. I have a table with the labels and I just change the datapoints with a simple query.

Problem -> in order to export the nice graph to other applications (Word, WordPerfect, Excel, etc..) I need the report Datasheet to update as well. It doesn't! :(

values in table
x axis value
1998 0.01
1999 0.02
2000 0.02
2001 0.03
2002 0.92

I could update the datasheet manually by cutting/pasting the table into the datasheet each time... but there's got to be a better way to do it!

Here's some code:

Function Populate_graph_table()

Dim db
Dim rnqry As String

rnqry = "UPDATE graph_table INNER JOIN graph_query ON [graph_table].label = graph_query.fixed_label SET [graph_table].Percent = [graph_query]![Percent] WHERE (((graph_query.plan)=4) AND ((graph_query.num)=5)); "

Set db = CurrentDb()
db.Execute rnqry
End Function

Is there code to update/refresh the Datasheet?

Nowanda:)
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,221,501
Messages
6,160,177
Members
451,629
Latest member
MNexcelguy19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top