Sql almost complete

cie00011

New member
Local time
Today, 23:10
Joined
Apr 26, 2006
Messages
9
For a graph i have the below code sql to define the chart results

Code:
SELECT [Load],[Displacement] FROM [try];

try is a text box containing a table name within the access DB. how do i change the FROM sql statement to look at the name in the text box and use it as to draw the graph?

options in the text box are for example

TABLE1
TABLE2
etc....

If i use
SELECT [Load],[Displacement] FROM [TABLE1];
SELECT [Load],[Displacement] FROM [TABLE2];

all is well, i need to get it to look at the text box, well a combo box
 
if you have done this in VB you could asign a variable to the textbox i.e.

Dim TableName as String

TableName = Me.YourTextBox

SELECT [LOAD], [Displacement] FROM TableName

Not sure if you can call the variable within the SQL Statment in this way as am still learning myself.
 
SELECT [Load],[Displacement] FROM Forms!FormName!ControlName;
using your Form and Control names of course.
 

Users who are viewing this thread

Back
Top Bottom