F
fl
I am using Access 2002. Can someone show me some examples of handling
the following situation:
strSQL1 = "SELECT DISTINCT tblSerDef.SERIES FROM tblSerDef GROUP BY
tblSerDef.SERIES " & _
"HAVING (((tblSerDef.SERIES) In (SELECT tblSerDef.SERIES FROM
tblSerDef " & _
"GROUP BY tblSerDef.SERIES, tblSerDef.GroupID HAVING
(((tblSerDef.GroupID) = '" & Me!ListID & "')))))"
strSQL2 = "SELECT DISTINCT tblSerDef.GroupID, tblSerDef.SERIES FROM
tblSerDef " & _
"GROUP BY tblSerDef.GroupID, tblSerDef.SERIES"
strSQL3 = "SELECT DISTINCT [Query1+].GroupID FROM Query1 INNER JOIN
[Query1+] ON Query1.SERIES = [Query1+].SERIES " & _
"GROUP BY [Query1+].GroupID HAVING
(((Count(Query1.SERIES))=(SELECT COUNT(*) FROM Query1)))"
Me!List127.RowSourceType = "Table/Query"
Me!List127.RowSource = strSQL3
The results of strSQL3 will be the RowSource for a list box. strSQL3 is
the result of a joint query from strSQL1 and strSQL2.
I am not clear about ADO vs. DAO and I don't know the syntax to provide
the results. Please advice. Thanks.
Faye
the following situation:
strSQL1 = "SELECT DISTINCT tblSerDef.SERIES FROM tblSerDef GROUP BY
tblSerDef.SERIES " & _
"HAVING (((tblSerDef.SERIES) In (SELECT tblSerDef.SERIES FROM
tblSerDef " & _
"GROUP BY tblSerDef.SERIES, tblSerDef.GroupID HAVING
(((tblSerDef.GroupID) = '" & Me!ListID & "')))))"
strSQL2 = "SELECT DISTINCT tblSerDef.GroupID, tblSerDef.SERIES FROM
tblSerDef " & _
"GROUP BY tblSerDef.GroupID, tblSerDef.SERIES"
strSQL3 = "SELECT DISTINCT [Query1+].GroupID FROM Query1 INNER JOIN
[Query1+] ON Query1.SERIES = [Query1+].SERIES " & _
"GROUP BY [Query1+].GroupID HAVING
(((Count(Query1.SERIES))=(SELECT COUNT(*) FROM Query1)))"
Me!List127.RowSourceType = "Table/Query"
Me!List127.RowSource = strSQL3
The results of strSQL3 will be the RowSource for a list box. strSQL3 is
the result of a joint query from strSQL1 and strSQL2.
I am not clear about ADO vs. DAO and I don't know the syntax to provide
the results. Please advice. Thanks.
Faye