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
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