IN THE SPOTLIGHT: MDE to MDB Conversion Service
(also supports: ACCDE to ACCDB, ADE to ADP, etc)
IN THE SPOTLIGHT: Access Database Repair Service
An in-depth repair service for corrupt Microsoft Access files
IN THE SPOTLIGHT: vbWatchdog
VBA error handling just got easier...
" vbWatchdog is off the chart. It solves a long standing problem of how to consolidate error handling into one global location and avoid repetitious code within applications. "
- Joe Anderson,
Microsoft Access MVP
Meet Shady, the vbWatchdog mascot watching over your VBA code →
(courtesy of Crystal Long, Microsoft Access MVP)
IN THE SPOTLIGHT: vbMAPI
An Outlook / MAPI code library for VBA, .NET and C# projects
Get emails out to your customers reliably, and without hassle, every single time.
Use vbMAPI alongside Microsoft Outlook to add professional emailing capabilities to your projects.
IN THE SPOTLIGHT: Code Protector
Standard compilation to MDE/ACCDE format is flawed and reversible.
Provided by Allen Browne, allenbrowne.com
Sooner or later, you will need to refer to information in a control on another form - a subform, the parent form, or some other form altogether. Say for example we have a form called "Students" that displays student names and addresses. In this form is a subform called "Grades" that displays the classes passed and credit points earned for the student in the main form. How can the Students form refer to the Credits control in the Grades subform?
Access refers to open forms as "Forms". Using the dot as a separator, the Surname control on the Students form can be referenced as:
Forms.Students.Surname
If there are spaces in the names of your objects, use square brackets around the names, e.g.:
Forms.[Students Form].[First Name]
Now, the area on a form that contains a subform is actually a control too: just have a look at it in design view. This control has a ".form" property which refers to the form that it holds. This ".form" must be included if you wish to refer to controls in the subform. For example:
Forms.Students.Grades.Form.Credits
where "Students" is the name of the parent form, "Grades" is the name of the control that holds the subform, and "Credits" is a control on the subform.
Once you get the hang of referring to things this way, you will use it incessantly, to SetValue in macros, to print a report limited to a certain financial period (the WHERE clause in the OpenReport action) etc.
In code, you can use Me and Parent to shorten the references. See Help in the VBA window for details.
Home | Index of tips | Top |
Rate this article:
This is a cached tutorial, reproduced with permission.
iTech Masters | VAT: GB202994606 | Terms | Sitemap | Newsletter