Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Desperate Need Of Code For Dynamic Column Names

Status
Not open for further replies.

pjd218

Technical User
Apr 14, 2008
40
US
I have a query that derives its records from two xtab queries.

I need a report that will dynamically display the column headings and fields based on the query contents.

This has to be dynamic as the records will change in the xtabs.

I am working on the premise of the unbound text boxes for column heads and data fields.

I have tried every bit of code out there and cannot get this to work. I also have implemented functionality similar to D'Hookum's examples for data drilling and diplaying data in a datasheet subform and that works fine.

However, I need the formatting of a report for totals, titles, etc. not just a datasheet print view.

Does anyone have the code that will make this work?

Sorry to make such a blatant request for code help, but I am at my end on this.

The report will open via a command button.

Thanks.

 

you might play around a bit with this:

rs.Open "select * from YOUR QUERY".....

For i = 0 To rs.Fields.Count

Debug.Print rs.Fields(i).Name
Debug.Print rs.Fields(i).Value

Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top