Tab form refresh

danikuper

Registered User.
Local time
Today, 04:10
Joined
Feb 6, 2003
Messages
147
Hi,

I have a main form which contain two tabs. One is "open orders" and another one is "closed orders".

Each tab has a subform (frmOpenOrders and frmClosedOrders) and each subform is based on different queries:

qryOpenOrders: queries the database for open orders only
qryClosedOrders: queries the database for closed orders only

The idea is that the user sees only open orders in one tab and sees only closed orders in another tab. If the user changes the status of an order from "open" to "closed", he will only see this reflected in the "closed orders" tab when he closes and re-opens the main form. Is there a way to "refresh" the form when the user, after changing the status of an order clicks on the "closed orders" tab?

thanks!!!
 
Search help for Requery for some details on using that method. If you are using Access2000 search help from any code page....

hth,
Jack
 
I see.

The help file says I can requery a specific control on a form but how do I requery the whole subform on a tab?

Should I place the requery command on the onclick event of the tab itself?

thanks!

P.S.: sorry, forgot to mention I'm using Access 2000
 
A subform is a Control on a form so Me.SubformName.Requery should do the trick. You can place the code wherever you make a change that will cause you to need to requery the subform.

hth,
Jack
 

Users who are viewing this thread

Back
Top Bottom