devxlogo

Data Field Refresh on Forms

Data Field Refresh on Forms

Question:
I have a multi-page form with navigation controls on the first page. When I “Next”through the records, the data fields refresh fine on Page One but not on the other pages.What am I doing wrong?

Answer:
The Next button calls the refresh method of the pageframe. For GUI optimization reasons,VFP only refreshes the currently visible page when the refresh method of a pageframe iscalled. There are two approaches you could take to solve your problem:

  1. Add the following code to the Activate event of each page in the pageframe:
    this.Refresh()

    This will refresh each page as it is activated.

    OR

  2. Put the following code into the Refresh method of the pageframe:
    LOCAL lnPageFOR lnPage = 1 TO This.PageCount    this.Pages(lnPage).Refresh()ENDFOR

    This will call the refresh method of each page in the pageframe.

See also  Why ChatGPT Is So Important Today
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist