I've created 2 recordsets
Set Rcdst01 = ThisDatabase.OpenRecordset(RcdSt01SqlString, dbOpenDynaset)
Set RcdSt02 = ThisDatabase.OpenRecordset(RcdST02SqlString, dbOpenDynaset)
I would like to create a 3rd recordsset joining the first 2.
The resulting recordset would contain Fields 1,2,3 from RcdST01 and fields 4,5,6 from both recordsets. the join would be on fields 1,2,3 of both RcdSt's
Here's where I'm at so far - no working
'SELECT RcdSt01.*, RcdSt02.* " & _
"FROM RcdSt01 " & _
"INNER JOIN RcdSt01 AS RcdSt02 " & _
"ON (RcdSt01!Fld1 = RcdSt02!Fld1) " & _
"AND (RcdSt01!Fld2 = RcdSt02!Fld2) " & _
"AND (RcdSt01!Fld3 = RcdSt02!Fld3);"
thx
RGB
Set Rcdst01 = ThisDatabase.OpenRecordset(RcdSt01SqlString, dbOpenDynaset)
Set RcdSt02 = ThisDatabase.OpenRecordset(RcdST02SqlString, dbOpenDynaset)
I would like to create a 3rd recordsset joining the first 2.
The resulting recordset would contain Fields 1,2,3 from RcdST01 and fields 4,5,6 from both recordsets. the join would be on fields 1,2,3 of both RcdSt's
Here's where I'm at so far - no working
'SELECT RcdSt01.*, RcdSt02.* " & _
"FROM RcdSt01 " & _
"INNER JOIN RcdSt01 AS RcdSt02 " & _
"ON (RcdSt01!Fld1 = RcdSt02!Fld1) " & _
"AND (RcdSt01!Fld2 = RcdSt02!Fld2) " & _
"AND (RcdSt01!Fld3 = RcdSt02!Fld3);"
thx
RGB