ACC: How to Fill Text Boxes on a Report Using Visual Basic (143280)
The information in this article applies to:
- Microsoft Access for Windows 95 7.0
- Microsoft Access 97
This article was previously published under Q143280
Moderate: Requires basic macro, coding, and interoperability skills.
SUMMARY
This article shows you how to create a sample Visual Basic for Applications
function that populates (or fills) controls on a report based on a table
or query when you preview or print the report. The sample function
fills a newly-created text box on a report with a value from the
QuantityPerUnit field in the Products table of the sample database
Northwind.mdb. The report is based on the Current Product List query
of the Northwind database.
This article assumes that you are familiar with Visual Basic for
Applications and with creating Microsoft Access applications using the
programming tools provided with Microsoft Access. For more information
about Visual Basic for Applications, please refer to your version of the
"Building Applications with Microsoft Access" manual.
NOTE: This article explains a technique demonstrated in the sample
files, RptSampl.exe (for Microsoft Access for Windows 95 version 7.0)
and RptSmp97.exe (for Microsoft Access 97). For information about how
to obtain these sample files, please see the following articles in the
Microsoft Knowledge Base:
145777 ACC95: Microsoft Access Sample Reports Available in Download Center
175072 ACC97: Microsoft Access 97 Sample Reports Available in Download Center
REFERENCES
For an example of how to fill text boxes on a report using Access Basic,
please see the following article in the Microsoft Knowledge Base:
109943
How to Fill Text Boxes on a Report Using Access Basic
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbhowto kbProgramming KB143280 |
---|
|