Hi there,

i have a problen selecting data from an Access Database.

i am using Microsoft DAO 3.6 Object Library

i have the followin tables:

testA (id number, vctext text)
1,"a"
4,"b"

testB(id number, vctext text)
1,"a"
2,"b"
1,"a "
2,"b "


my code is:

Private Sub Form_Load()
Dim sSql As String
Dim gdbloc As Database

DBEngine.SetOption dbImplicitCommitSync, "YES"
Set gdbloc = OpenDatabase("c:\test.mdb", False, False, "")

sSql = "select testa.id as item_no, testb.vctext as DESC_1TB from "
sSql = sSql & "testA left join testB on (testa.vctext = testb.vctext) "
sSql = sSql & " order by testa.id "

Set rs = gdbloc.OpenRecordset(sSql, dbOpenSnapshot)
While Not rs.EOF
MsgBox (rs!item_no & " " & rs!DESC_1TB)
rs.MoveNext
Wend
rs.Close
End Sub


and i get 4 Messageboxes saying:
"1 a"
"1 a "
"4 b"
"4 b "

I expected only 2!

Can someone help?

Best Regards

Lars