totn Access

MS Access 2007: Refresh data in a form

This MSAccess tutorial explains how to refresh data in a form in Access 2007 (with step-by-step instructions).

Question: In my Access 2007 database, I've created a form. My data has changed on my form, but the form is not reflecting these changes. How can I refresh the data that is showing in this form?

Answer: To refresh the data in a form, you could create a button on the form and attach the following code to the On_Click event:

Private Sub Command1_Click()

   DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70

End Sub

In this example, we've created a button called Command1. When the button is clicked, the form will requery the data displayed in the form. If the data has changed, these changes will now be displayed in the form.