recordset objects and joining them in VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have successfully created 2 recordsets in VBA and now I want to join them
in the code to create a 3rd, new recordset. I have created an SQL statement
that would work if there was actually a query object created, but since
everything is "virtual" in the VBA code, how do I do this?
 
I think I may have fixed the problem...or at least gotten a step closer.

Instead of using recordsets, I've created new querydefs so that I can call
the queries with an object variable.
 
Steve said:
I have successfully created 2 recordsets in VBA and now I want to join them
in the code to create a 3rd, new recordset. I have created an SQL statement
that would work if there was actually a query object created, but since
everything is "virtual" in the VBA code, how do I do this?


The joining needs to be done in a query before you start
messing with recordsets. If you just want one set of
records to follow the set of Records, then UNION your two
queries.
 
I think I may have fixed the problem...or at least gotten a step closer.

Instead of using recordsets, I've created new querydefs so that I can call
the queries with an object variable.

you can create a recordset based on a query string or canned query.
You could use a union query...
 
Back
Top