Efficient Computerized Reports Using VBA Macro Objects

Efficient Computerized Reports Using VBA Macro Objects

by Admin · 0 comments · in Excel Programming

A concept called object oriented programming is becoming increasingly familiar in the IT world because most programming languages of today deal with objects. Excel VBA essentially is not an object oriented programming language but it deals with objects. The concept of VBA objects can be best understood when explained in terms of the VBA objects as tools that can contain data and has certain functions and properties. In Excel terminology the worksheet is an object, each cell in the worksheet is an object, the text box is an object and so on. Excel is the creator of all objects, so it is popularly known as the Application object that contains all other objects like the ones mentioned above. The Workbook in Excel is an object and the Worksheet is an object within the Workbook. In turn, the Worksheet contains objects like the Range. So quite simply put, Excel VBA programming deals with working with a hierarchy of objects.

 

Report Optimizations in MS Access

  • Save Reports as Queries

In most reported cases, we have come across the issue of a saved query loading significantly faster than the same query stored and saved as the Record Source of a report. This is because the saved queries are more optimized than the ones stored in the SQL string. So a good tip is to save the reports as queries in order to make them load faster.

 

  • Avoid Sorting Report Queries

Avoid using the Order By clause for queries to base reports on queries. In Access, use the Sorting and Grouping option tab to sort and group reports. It is advisable to avoid the reports that use Expressions or Functions to sort and group information. Indexing ay fields used for sorting and grouping is also recommended.

 

  • Minimize Fields Report by Basing Reports on Queries

It is a good idea to base reports and sub reports on Queries instead of tables. Basing your reports on queries can significantly reduce the number of fields returned to the minimal number. This reduction makes your data load faster.

 

  • For Criteria use Index Sub report Fields

It is a good idea to index all sub report fields for criteria because this small tip will cause a much faster loading of the records of the sub report. But over indexing can lead to significant slags in level of performance when you are trying to delete, edit or add data to the existing report. 

  • Use the No Data Option for Empty Reports

In case any reports or sub reports do not have any data, you can identify these empty reports using the No Data option. When you identify the empty report, you can delete it. This option is much easier than going to all the procedural hassle to see if data exists for the report.

  • Delete Unnecessary Reports

If any sub report has a data that contains the same or similar queries as the parent report, then it is best to add the contents of the sub report to the main report and delete the sub report to avoid confusion and unnecessary repetition of data.

    So with VBA objects in Excel, you can get efficient computerized reports with a few tips and tricks.      

Comments (0)

POST YOUR COMMENT

Code
Excelq.com doing business as a Service of Venttraffic Media Inc. Excel and other words on this site may be trademarks or registered trademarks of Microsoft Corporation. Microsoft Corporation is not connected in any way with this website, and makes no endorsement of the site or its related contents. All rights reserved. Website powered by Venttraffic Media Inc.