ACC2000: Running Code with RepaintObject on a Data Access Page Erases Recent Changes (225976)
The information in this article applies to:
This article was previously published under Q225976 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
SYMPTOMS
When you run the RepaintObject method of the DoCmd object on a data access page, you may lose the most recent changes that you made to the design of the page.
CAUSE
The RepaintObject method reloads the page from the persisted state on disk.
RESOLUTION
Make sure that you either save the page or view the page in Page view before you run Visual Basic for Application code that contains the RepaintObject method.
Saving the Page
To manually save the page, click Save on the File menu.
-or-
To programmatically save the page, use a line similar to the following:
DoCmd.Save acDataAccessPage, "<pagename>"
Viewing the Page in Page View
To manually view the page in Page view, click Page View on the View menu, and then click Design View on the View menu.
-or-
To programmatically view the page in Page view, use a line similar to the following:
DoCmd.OpenDataAccessPage, "<pagename>", acDataAccessPageBrowse
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 6/24/2004 |
---|
Keywords: | kbbug kbDAP kbpending KB225976 |
---|
|