ACC: How to Display the Page Number on a Multiple Page FormID: Q132144
|
Forms that contain more content than can fit on one screen can use page breaks to enable you to use the PAGE UP and PAGE DOWN keys to display the content on different screens. The Employees form in the sample database NWIND.MDB uses this PAGE UP and PAGE DOWN key feature. This article shows you how you can add a text box to the Employees form that, through the use of a macro, displays the current page number when you press the PAGE UP or PAGE DOWN keys.
To add the page number feature to the Employees form, follow these steps.
CAUTION: Following the steps in this example will modify the sample
database NWIND.MDB. You may want to back up the NWIND.MDB file, or perform
these steps on a copy of the NWIND database.
Macro Name Action
--------------------
Page1 SetValue
Page2 SetValue
Page1 Actions
-----------------------------------------
SetValue
Item: [Forms]![Employees]![txtpageNum]
Expression: "Page #1 of 2"
Page2 Actions
-----------------------------------------
SetValue
Item: [Forms]![Employees]![txtpageNum]
Expression: "Page #2 of 2"
txtPageNum
EmpFormPageNums.Page1
EmpFormPageNums.Page2
Microsoft Access "User's Guide," version 2.0, Chapter 24, "Macro Basics"
Microsoft Access "User's Guide," version 2.0, Chapter 25, "Using Macros
with Forms"
Keywords : kbusage FmsHowto
Version : 1.0 1.1 2.0
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: April 30, 1999