"The code is exactly
how I would like to write code and the algorithms used are very
efficient and well-documented."
Van T. Dinh, Microsoft MVP
|
|
|
Category:
|
Microsoft Access : Forms
|
|
Description:
|
Access Forms working with data in ACCDB, MDB, and ADPs, subforms, and spell checking
|
Module: modSubForms
General routines for Microsoft Access subforms (Jet and ADP). These functions will also work with normal forms, however, we are showing how to do additional things like:
- Subclassing a subform in order to discern when an event on a subform fires. The example code here is all that is necessary for this since we do not need to create an additional class to accomplish this task.
- Prevent adding records to a subform if it has met a maximum number of records with the AllowDisallowAdditionsToForm and GetRecordCount functions.
|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the modSubForms module
|
|
AllowDisallowAdditionsToForm
|
Procedure
|
Designed to prevent additions from being made if a record count is met or exceeded.
|
|
GetRecordCount
|
Procedure
|
Gets the number of records in the passed recordset.
This can be the form's recordset or any other recordset you pass to it.
|
|
ResyncSubformRecord
|
Procedure
|
In a Microsoft Access form with a linked subform, when the master record is updated, the subform resets itself to the first record.
To jump to a particular subform record, get the ID identifying the row that should be the current one.
Use this ID value to search on the RecordsetClone and use the bookmark property to resync your subform record.
|
|
ResyncSubformRecordADP
|
Procedure
|
For ADPs. In a Microsoft Access form with a linked subform, when the master record is updated, the subform resets itself to the first record.
To jump to a particular subform record, get the ID identifying the row that should be the current one.
Use this ID value to search on the recordset and use the bookmark property to resync your subform record.
|
Overview of Total Visual SourceBook
The source code in Total Visual
SourceBook includes modules and classes for Microsoft Access, Visual
Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily
add this professionally written, tested, and documented royalty-free code
into your applications to simplify your application development efforts.
Additional Resources
|
|