Code placement for a graph

cie00011

New member
Local time
Today, 03:33
Joined
Apr 26, 2006
Messages
9
My problems is a difficult one.

Here is the breakdown. I have a number of tables within a database, I have a main screen as to pick the required table I want to display in either tabular or graph format, the table works. I have created a graph and am trying to get the code or row source in the properties to look at the VBA I have written.

Any ideas please?

It’s something to do with the row source type. If it were a function, I would just put the function name there. It’s a private sub.

Private Sub ListMonkey()

Dim TableName As String
Dim strSQL As String

TableName = Me.Graph_Selected_Table
strSQL = "SELECT [LOAD], [Displacement] FROM " & TableName

End Sub

This is the last little thing, and I have no idea how to solve it.
 
Solved

The solution to this was to approach from a different angle.

I made the graph simply look at one table that changed depending on the selection, which was a lot easier to do. From the combo selection, VBA copied that table and renamed that "Graph_Data". In the Row Source I entered the normal SQl look at Select X, Y from Graph_Data.

Now, every time you select a different table, the old file is written over with this new data, updating the graph as a by-product.
 

Users who are viewing this thread

Back
Top Bottom