Microsoft Access – Refreshing Data On A Form or In A Form Control

I’ve just been working on a tabbed form within Microsoft Access where each tab contains a sub form showing subsets of data.

The user can make a change on one form which must then be reflected on another form.

To do this we must refresh (or requery) the data on the form that is to relflect the change.

We can do this using the REQUERY method.

In my case this meant the following line of code:

Forms![frmMainForm]![frmSubFormOnMainForm].Requery

We could even requery a single control by using the format:

Forms![frmMainForm]![frmSubFormOnMainForm].ControlName.Requery

As Microsoft explains at http://msdn.microsoft.com/en-us/library/aa199106(office.10).aspx:

The Requery method does one of the following:

  • Reruns the query on which the form or control is based.
  • Displays any new or changed records or removes deleted records from the table on which the form or control is based.
  • Updates records displayed based on any changes to the Filter property of the form.
Advertisements

0 Responses to “Microsoft Access – Refreshing Data On A Form or In A Form Control”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Blog Stats

  • 222,048 hits

Counter

ClustrMap


%d bloggers like this: