OnlinePCTips.com

PC Tips and Tricks to make your life easier
Subscribe

The Difference Between Me.Requery And Me.Refresh

March 16, 2010 By: lilybird Category: Software

A lot of new users of Microsoft Access database often have it hard to understand the difference between Me.Requery and Me.Refresh. This article will help you understand the differences between the two.

The short explanation of the differences is that both Refresh and Requery save alterations to the current data record. But Requery pulls the new data from the particular table or query with all new deletions and addition. Refresh will not show the deleted or new records and it only updates the data records in the current form.

Here is the longer explanation. Requery makes the recordset to reload for the form. It means that all the data in current form will reload. This will make you lose your current position and you will get back to the first record. Requery is similar to closing and opening the form again. All new records added by other users will be accessible. In the same way, all deleted records will disappear. Requery reruns the query, which was used to pull the data into the form at the beginning. You can also use Requery to update the data in the combo box or the list box.

Refresh option saves the record you are currently working on. It will also recall any alterations, but not deletions or additions to the records displayed in the form. If there are any calculations on the form, they will be recalculated. Refresh does not reload the entire recordset, so you don’t lose your form position and stay on the record you are working on. And the records added by other database users will not be displayed.

If you need to open another form or a report with the data on the form, you have to use a Refresh command. You also need a Me.Refresh to save the table data, so that it could print correctly. You can’t use Requery here, because it will put you on the first record and it might disagree with your preferences.

Access has two more commands, which often get confused with Requery and Refresh. They are Repaint and Recalc.

The command Me.Repaint redraws the form and its controls. This command is useful, when you are running a form with long event loops and timers and when you want to force the update on the screen while the event is running. This prevents the user from just waiting for a long time and seeing nothing happening on the screen. This command doesn’t affect data.

The Recalc command reevaluates all the calculated controls on the form. But this command might be used rarely, because MS Access is actually pretty good at recalculating automatically. But if you see that there is a calculation needs to be done and it is not updating, you can run the Recalc command to force this action.

Need help with access database examples – this web site with microsoft access database advice and assistance can be the one that you’ve been looking for.

And some general tips – today the online technologies give you a truly unique chance to choose exactly what you need at the best terms which are available on the market. Strange, but most of the people don’t use this opportunity. In real life it means that you must use all the tools of today to get the info that you need.

Search Google and other search engines. Visit social networks and have a look on the accounts that are relevant to your topic. Go to the niche forums and join the discussion. All this will help you to create a true vision of this market. Thus, giving you a real opportunity to make a wise and nicely balanced decision.

And also sign up to the RSS on this blog, because we will do the best to keep this blog tuned up to the day with new publications about microsoft access database industry.

Leave a Reply