B
Ben8765
Hello,
I have a query called query1.
I also have query2 which is a list of unique records in query1 based on
certain fields.
For each unique record in query2, I would like to select the records in
query1 that match the values in query2. *Then make a union query, a crosstab
query, and then union each set of unique records into one big query (for a
report).*
The union stuff between the *s is not important.
What I want to know is:
Is it possible to loop through records using sql?
I think it is possible to do this through vba, by looping through the
records in query1 and then generating the queries I want through vba.
If it is not possible to do this through sql, then any pointers about the
vba method would be appreciated. It seems it would be simpler if I could just
do it through sql though.
So, again my question is: Is it possible to loop through records using sql
(and then generate queries)?
If necessary, I can provide examples of my data, although it seems difficult
to effectively show tables/queries in text format.
-Ben
I have a query called query1.
I also have query2 which is a list of unique records in query1 based on
certain fields.
For each unique record in query2, I would like to select the records in
query1 that match the values in query2. *Then make a union query, a crosstab
query, and then union each set of unique records into one big query (for a
report).*
The union stuff between the *s is not important.
What I want to know is:
Is it possible to loop through records using sql?
I think it is possible to do this through vba, by looping through the
records in query1 and then generating the queries I want through vba.
If it is not possible to do this through sql, then any pointers about the
vba method would be appreciated. It seems it would be simpler if I could just
do it through sql though.
So, again my question is: Is it possible to loop through records using sql
(and then generate queries)?
If necessary, I can provide examples of my data, although it seems difficult
to effectively show tables/queries in text format.
-Ben