I have a query (qry_count_buildingcode). It returns the number of work orders for each building. This query gets its fields from another query. Although 'qry_count_buildingcode' returns two simple columns of data ('Count of work orders' and 'Building Name'), I cannot make Access automatically export this data to Excel.
CountOfWO_NUMBER FU_BLDGCODE_DUP
46 FMTSC
14 ADMFMTS
10 RECY
4 MTRPL
2 RANSH
2 PAISH
1 POLEB
1 OGG
1 HTGPLT
1 GRDNC
1
When I try the VBA code on a set of data derived from only one table, it works fine. When running the code on qry_count_buildingcode, a break occurs at the following line
' Create recordset
Set rst = New ADODB.Recordset
rst.Open _
Source:=conQuery, _
ActiveConnection:=CurrentProject.Connection
I was wondering if there is a way to make Access just take the query results and simply copy them into Excel.
I hope I was clear.
CountOfWO_NUMBER FU_BLDGCODE_DUP
46 FMTSC
14 ADMFMTS
10 RECY
4 MTRPL
2 RANSH
2 PAISH
1 POLEB
1 OGG
1 HTGPLT
1 GRDNC
1
When I try the VBA code on a set of data derived from only one table, it works fine. When running the code on qry_count_buildingcode, a break occurs at the following line
' Create recordset
Set rst = New ADODB.Recordset
rst.Open _
Source:=conQuery, _
ActiveConnection:=CurrentProject.Connection
I was wondering if there is a way to make Access just take the query results and simply copy them into Excel.
I hope I was clear.