var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: CreateQuerydef fails with JOIN
I am trying to create q query that has a where clause determined by a from field. I get an error suggesting that the FROM cluase is incorrect.
This is the code.
Dim cur_db As DAO.Database
Dim k1 As DAO.QueryDef
Set cur_db = OpenDatabase("DB_access", dbDriverNoPrompt, False, "ODBC")
Set k1 = cur_db.CreateQueryDef("")
k1.SQL = sql_string
sql_string = "SELECT [some fields] FROM table_1"
the code works fine. However, if
sql_String = "SELECT [some fields] FROM table_1 CROSS JOIN table_2"
I get the error that the FROM field has a fault. This is also true for other types of joins as well.
What am I doing wrong?