TableA = names
TableB = activities + names
Target : list with all the names+total activities and for each name followed by the detailrecords of the activities
(1) the first line = the first name (from tableA)+ total activities for this name (from tableB)
(2) the following line(s) under this nameline(s) : all the (detail) records of the activities for that name (from tableB)
idem for the 2nd name, the 3rd etc. ... EOF names
fp_sQry="SELECT tableB.*, tableA.Ldnnr, tableA.Lname, tableA.Fname,
(Select Sum(AntlAh) FROM tableB) AS [TTAntlAh], '=> total of the whole list = of all the names/activities
(Select Sum(AntlAh) FROM tableB WHERE FnaamAh=[tabelA].Lname) AS [TAntlAh] '=> this total comes in the line(s) (1)
FROM tableA
WHERE tableA.Ldnnr >= 1 '=> selection of the names
LEFT JOIN tableB ON tableA.Lname=tableB.LnameAh
ORDER BY tableA.Lname, tableA.Fname ASC"
Database Results Error
Description: Syntax error (missing operator) in query expression 'tableA.Ldnnr>=1 LEFT JOIN tableB ON tableA.Lname=tableB.LnameAh'.
Number: -2147217900 (0x80040E14)
Source: Microsoft JET Database Engine
What will be the missing operator ? or other possible errors ?
Thanks for tips - Leifoet
TableB = activities + names
Target : list with all the names+total activities and for each name followed by the detailrecords of the activities
(1) the first line = the first name (from tableA)+ total activities for this name (from tableB)
(2) the following line(s) under this nameline(s) : all the (detail) records of the activities for that name (from tableB)
idem for the 2nd name, the 3rd etc. ... EOF names
fp_sQry="SELECT tableB.*, tableA.Ldnnr, tableA.Lname, tableA.Fname,
(Select Sum(AntlAh) FROM tableB) AS [TTAntlAh], '=> total of the whole list = of all the names/activities
(Select Sum(AntlAh) FROM tableB WHERE FnaamAh=[tabelA].Lname) AS [TAntlAh] '=> this total comes in the line(s) (1)
FROM tableA
WHERE tableA.Ldnnr >= 1 '=> selection of the names
LEFT JOIN tableB ON tableA.Lname=tableB.LnameAh
ORDER BY tableA.Lname, tableA.Fname ASC"
Database Results Error
Description: Syntax error (missing operator) in query expression 'tableA.Ldnnr>=1 LEFT JOIN tableB ON tableA.Lname=tableB.LnameAh'.
Number: -2147217900 (0x80040E14)
Source: Microsoft JET Database Engine
What will be the missing operator ? or other possible errors ?
Thanks for tips - Leifoet