How to use Visual Basic to fill text boxes on a report in Microsoft Access (291533)
The information in this article applies to:
- Microsoft Office Access 2003
- Microsoft Access 2002
This article was previously published under Q291533 This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
Moderate: Requires basic macro, coding, and interoperability skills.
For a Microsoft Access 2000 version of this article, see 210136.
For a Microsoft Access 97 version of this article, see 143280.
SUMMARY
This article shows you how to create a sample Visual Basic for Applications
function that populates (or fills) controls on a report that is based on a table or a 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.
NOTE: This article explains a technique demonstrated in the sample
file, RptSmp00.mdb.
For additional information about how to obtain this sample file, click the following article number to view the article in the Microsoft Knowledge Base:
231851
ACC2000: Microsoft Access 2000 sample reports available in Download Center
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbReport kbProgramming kbhowto KB291533 |
---|
|