Subject: ResetForms
Posted By: Teqlump Post Date: 9/24/2004 1:42:17 PM
Hello All,
I am taking a beginner VBA course and the book I am using has  projects on a CD and one of the projects has an example where it is using a command button to reset a form with the ResetForm method.  I copied this example off of the CD and into a command button click event.  When I click this button it comes back and says that the ResetForm method does not exist.  Can someone give me the name of the command that is used to Reset Forms in VBA?

Reply By: Paulsh Reply Date: 9/24/2004 2:46:59 PM
You could be looking for the Refresh method?

Use the Refresh method to immediately update the records in the underlying record source for a specified form or datasheet to reflect changes made to the data by you and other users in a multiuser environment. The Refresh method shows only changes that have been made to the current set of records; it doesn't reflect new records or deleted records in the record source. Using the Refresh method is equivalent to clicking Refresh on the Records menu.

Private Sub Form_Activate()
    Me.Refresh
End Sub

Paul

Reply By: Teqlump Reply Date: 9/24/2004 2:54:16 PM
Thanks Paulsh,
I will definitely use that. But why would someone who wrote a book to help beginning VBA programmers, use a method in one of his sample programs that isn't even used by VBA? Strange. Thanks again.


Go to topic 19721

Return to index page 765
Return to index page 764
Return to index page 763
Return to index page 762
Return to index page 761
Return to index page 760
Return to index page 759
Return to index page 758
Return to index page 757
Return to index page 756