Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
DAO query/recordset returns with field names
How do i change this code to return the field names on
top of the recordset returned from the SQL statement? Sub tri4() ' ' tri4 Macro ' Macro recorded 8/18/2003 by smanchik ' Set dbs = OpenDatabase("P:\SManchik\Loss Triangles\Loss Triangles.mdb") Set qry = dbs.CreateQueryDef("tri5", "TRANSFORM Sum([105 - (b)].[5]) AS SumOf5 SELECT [105 - (b)].qtr AS AQ FROM [105 - (b)]GROUP BY [105 - (b)].qtr PIVOT [105 - (b)].order") Set rst = qry.OpenRecordset() [b9].CopyFromRecordset rst dbs.QueryDefs.Delete "tri5" dbs.Close ' End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
web query url returns data, but not showing | Excel Discussion (Misc queries) | |||
Query returns blank cells where there should be data | Excel Discussion (Misc queries) | |||
query a recordset | Excel Discussion (Misc queries) | |||
Show text field if SUM returns zero value? | Excel Discussion (Misc queries) | |||
Limiting size field MS query returns | Excel Discussion (Misc queries) |