S
Sergey Bogdanov
Hello,
the strange things are going on. I can't explain why the problem is
following I have two tables which are LEFT joined. I'd like to show all
records from one table and join records from another table:
"SELECT p.nosaukums,g.price,g.date FROM produkti AS p " & _
" LEFT JOIN PriceGroup AS g ON ((p.kods = g.product) AND (g.Name = "
& ClientGroup.Value & "))")
This recordset is editable when I'll remove this part of query -- AND
(g.Name = " & ClientGroup.Value & "), otherwise it is readonly. Please,
explain me why it happens?
Or maybe there are workaround?
Thnx,
Sergey
Dim dbs As Database
Dim rst As DAO.Recordset
Dim rst2 As DAO.Recordset
Set dbs = CurrentDb
If ClientGroup.Value <> "" Then
Set rst = dbs.OpenRecordset("SELECT p.nosaukums,g.price,g.date FROM
produkti AS p " & _
" LEFT JOIN PriceGroup AS g ON ((p.kods = g.product) AND (g.Name = "
& ClientGroup.Value & "))") '" & & "')")
' AND g.name = """ & ClientGroup.Value & """)")
Set Me.PriceGroup_subform.Form.Recordset = rst
End If
the strange things are going on. I can't explain why the problem is
following I have two tables which are LEFT joined. I'd like to show all
records from one table and join records from another table:
"SELECT p.nosaukums,g.price,g.date FROM produkti AS p " & _
" LEFT JOIN PriceGroup AS g ON ((p.kods = g.product) AND (g.Name = "
& ClientGroup.Value & "))")
This recordset is editable when I'll remove this part of query -- AND
(g.Name = " & ClientGroup.Value & "), otherwise it is readonly. Please,
explain me why it happens?
Or maybe there are workaround?
Thnx,
Sergey
Dim dbs As Database
Dim rst As DAO.Recordset
Dim rst2 As DAO.Recordset
Set dbs = CurrentDb
If ClientGroup.Value <> "" Then
Set rst = dbs.OpenRecordset("SELECT p.nosaukums,g.price,g.date FROM
produkti AS p " & _
" LEFT JOIN PriceGroup AS g ON ((p.kods = g.product) AND (g.Name = "
& ClientGroup.Value & "))") '" & & "')")
' AND g.name = """ & ClientGroup.Value & """)")
Set Me.PriceGroup_subform.Form.Recordset = rst
End If