Form Query Refresh

D

David

I have setup a form with multiple tabs that represent each milestone
of the process. A query supports each so that items "move" from one
tab to another based on what stage the item is at, allowing the user
to select the item & click a button to enter their portion.

This so far works great except that the data on all of the tabs is
only valid as of the time the form is opened. Is there a way for the
information to "refresh" on a regular basis without closing &
reopening the form?
 
D

Dirk Goldgar

David said:
I have setup a form with multiple tabs that represent each milestone
of the process. A query supports each so that items "move" from one
tab to another based on what stage the item is at, allowing the user
to select the item & click a button to enter their portion.

This so far works great except that the data on all of the tabs is
only valid as of the time the form is opened. Is there a way for the
information to "refresh" on a regular basis without closing &
reopening the form?


Do you mean that there is a subform on each tab? If so, you can use one or
more events to requery the subforms. While you could just do it
periodically using the form's Timer event, it would be more efficient and
less disruptive to do this only when you need to. For example, you only
need to requery the subform for a tab when that tab page is visible. For
that, you could use the tab control's Change event, and in that event
determine (from the tab control's Value property) which tab page is visible,
and requery the subform for that tab.

If there are other events that require a requery, such as (maybe) the
AfterUpdate event of one of the subforms, you can use those events to
requery that subform.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top