Find Helpful Info about Microsoft Access Database
Many new Microsoft Access users and developers are not always sure about the difference between Me.Requery and Me.Refresh. Basically, both of them save changes made to the record, but Me.Requery deals with all new data from table and query as well as new and deleted information, whereas Me.Refresh doesn’t show new or deleted records but updates only data in the current form. Now, let’s discuss this more detailed.
Me.Requery requires the entire form underlying data to reload. Reloading all of the form records will make you lose your current position and if you are currently on record 10 of 100, you will go back to the first record. It is basically the same as closing and opening the form again. Any record that has been deleted will disappear and new data added by other users will be available. From the name of the option we can understand that it basically reruns the query that was used to pull the data into the form. It can also be used to update the records in the combo box or list box.
As for Me.Refresh, it saves the record you are working on currently. It will also pill out any changes to the records displayed in the current form. All calculations will be recalculated on the form. This function doesn’t reload the record set, so you stay on the same record and don’t lose your form position. And no new data added by other users will be displayed.
If you need to open another form or report that has the data on the current form, you need to use Me.Refresh. You need to use Me.Refresh because you want to save the data to the table for it to show up on the print correctly. The reason you cannot use Requery is that it will put you on the first record of the record set and maybe that is not what you want.
Other commands like Repaint and Recalc often get confused with the requery and refresh ones. Me.Repaint command performs the redrawing of the current form and all of the screen controls. It is useful when you are running a form with long event loops and you need to perform some update on the screen while the event is happening, just so that the user could have something happening on the screen. The repaint command doesn’t affect the data.
Me.Recalc reevaluates all the calculations on the form. Even though Access is good at recalculating automatically, you can use Recalc to update the calculations if you see it is not happening. Recalc and repaint commands are not as common as the Me.Requery and Me.Refresh. Hopefully, this article made it a little clearer to you the use of these Access database commands.
The sphere of computers and computer applications grows all the time. But you can turn this issue into your strong point by catching up with this knowledge and becoming an expert, for example in microsoft access database sphere.
Please visit this site that is dedicated to microsoft access database topic and has a great line of microsoft access database products available.