MS Access Reports: Sums from distinct group headers

The problem: When we use formulas on textboxes in the report footers of MS Access reports, such as “=sum(a_field_in_header)”, we get incorrect results because of duplication of same amounts for multiple items in detail section. Here is an example to make it clear: We have two tables one for header and another detail records, for … Read moreMS Access Reports: Sums from distinct group headers

Faster lookup using VBA Collections

Problem:
Reading records from the database and instead of using DLookup or querying the database all the time, to improve performance we can read them into a VBA collection object and refer to it in memory. Especially, if the data in particular tables are not changing at all or changing very rarely, we can use this facility and hold the data in memory while the application is running. Beware of the number of records in your table and the amount of memory it may consume.

Update Query on MS Access

Microsoft programmers are always very particular on their way of approaching problems. Since they are the “biggest” software developers in the world, they have to set the standards!? Problem: Updating field(s) of a table using a complex (sub) query. Solution: 1. In standard SQL, you can this:

It makes sense, right? No, not according … Read moreUpdate Query on MS Access