Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
web query url returns data, but not showing Richard S[_2_] Excel Discussion (Misc queries) 0 April 30th 09 04:29 PM
Query returns blank cells where there should be data WillrSF Excel Discussion (Misc queries) 1 December 3rd 08 08:43 AM
query a recordset SAm Excel Discussion (Misc queries) 2 May 1st 07 09:33 PM
Show text field if SUM returns zero value? KevinG1 Excel Discussion (Misc queries) 1 April 21st 07 07:01 AM
Limiting size field MS query returns LarryLL Excel Discussion (Misc queries) 0 July 6th 06 11:52 PM


All times are GMT +1. The time now is 01:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"