Join expression not supported

longson

New member
Local time
Today, 17:02
Joined
Oct 30, 2006
Messages
5
Anyone can help me with this problem

In the following code

Dim qMain As ADODB.Recordset
Set qMain = New ADODB.Recordset
qMain.ActiveConnection = CurrentProject.Connection
qMain.CursorType = adOpenStatic



Dim strSql As String

strSql = "select MainTable!LotNo, MainTable!RollNo, FilmTest!RollNo, FilmTest!Av_56, FilmTest!Av_112,FilmTest!TestDate,FilmTest!TestTime" + _
" from MainTable LEFT JOIN FilmTest ON (MainTable!RollNo = FilmTest!RollNo) "

qMain.Open (strSql)

When excuted, the error was Join expression not supported
 
If that is your *exact* code then put a MsgBox strSql just before your Open statement and look at your SQL statement.
 
I've put. The SQL statement is normal formed/
 
It was probably an anomaly of this forum but you should be using the "&" as a concantenation character rather than the "+". What I saw was:
FilmTest!TestTim e" with that hanging e. Do you have any MISSING references?
 
Ist is as simple as removing the brackets?

LEFT JOIN FilmTest ON (MainTable!RollNo = FilmTest!RollNo) becomes
LEFT JOIN FilmTest ON MainTable!RollNo = FilmTest!RollNo
 
Table names and field names should be seperated by . not ! ....

You use the bang (!) to seperate forms and objects ...
 

Users who are viewing this thread

Back
Top Bottom