ACC2000: Text Box in Form Header or Footer Displays Previous Record When You Move Through Records (232294)
The information in this article applies to:
This article was previously published under Q232294 This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
Novice: Requires knowledge of the user interface on single-user computers.
SYMPTOMS
A text box in a header or footer of a form displays the previous values as you move forward and backward through the records.
CAUSE
When you click the navigation buttons in Form view to move forward and backward through the records, a text box in the header or footer of the form displays the value of the previous record when the following two conditions are true:
-
The textbox in the header or footer has the focus as you move through the records.
- The EnterKeyBehavior property of this text box is set to New Line in Field.
RESOLUTION
In the Current event of the form, use Visual Basic for Applications code to repaint the screen. To do so, follow these steps:
- Open your form in Design view.
- On the Edit menu, click Select Form.
- On the View menu, click Properties.
- In the Form property sheet, click the Event tab, click in the OnCurrent property box, click the Build (...) button, click Code Builder, and then click OK.
- Type the following code:
Private Sub Form_Current()
Me.Recalc
End Sub
- Save your changes and view the form.
Modification Type: | Major | Last Reviewed: | 6/29/2004 |
---|
Keywords: | kbnofix kbprb KB232294 |
---|
|