Hi, I have 2 queries. Each query gives me a result set.
What I need is to append the result from the 2nd query to the first one. How would I do that? The following is a sample of my code.
First, I use VBA to ouput the result from query 1 to an
excel spreadsheet, and it did work... what I want now is to append the result from the 2nd query to the same spreadsheet query 1 is in, except I want the result in the next column.
Right now, it looks like this
customername
-------------
Wendy
vivian
I Want
customername customer address
------------ -----------------
wendy 4315 107th
vivian 555 674th
Private Sub Command0_Click()
DoCmd.OutputTo acQuery, "Query1", "MicrosoftExcel(*.xls)", "C:\test.xls", True, ""
DoCmd.OpenQuery "Query2"
End Sub
Thanks,
Wendy
What I need is to append the result from the 2nd query to the first one. How would I do that? The following is a sample of my code.
First, I use VBA to ouput the result from query 1 to an
excel spreadsheet, and it did work... what I want now is to append the result from the 2nd query to the same spreadsheet query 1 is in, except I want the result in the next column.
Right now, it looks like this
customername
-------------
Wendy
vivian
I Want
customername customer address
------------ -----------------
wendy 4315 107th
vivian 555 674th
Private Sub Command0_Click()
DoCmd.OutputTo acQuery, "Query1", "MicrosoftExcel(*.xls)", "C:\test.xls", True, ""
DoCmd.OpenQuery "Query2"
End Sub
Thanks,
Wendy