Tip on renamed field names and debugging reports

Today's Guest Writer: Tony Toews, Microsoft Access MVP

I have a complex report with 5 grouping levels, subtotals, and three subreports for additional details of totals. There are also lots of calculated fields on the report with embedded control names.

I had to rename some fields in the base query as I had to insert some IIF logic in the query.

Well, I couldn't figure out where one particular field was being used. I looked in the usual suspect places by examining the object list. I then looked at the Sorting and Grouping sheet because that has caused me troubles in the past. Not there either.

Access 2003 usually has these nice widgets, or tips, or whatever those little black/navy triangular doodads in the corner of a control when you find a problem. (This feature BTW is the single nicest feature of A2003. IMNSHO and is well worth upgrading from previous versions for the developer or power user.) But these didn't work this time.

So I used the SaveAsText--at the debug/immediate window type: Application.SaveAsText acReport, "MyReport", "c:\report.txt" 

I opened the text field and found that that field in the Link Child Fields of a subreport. Whoohoo. Fixed.

Clint here--You can find other useful content from Tony on his web site. If you have a tip that you would like to pass along on this blog, send it my way. I'm always looking for good content to keep you all interested :-).

E4-27 Edited code to export report not form.