synchronizing forms in a tab control

G

Guest

I'm using a main form that holds a tab control. The tab control has two forms
on separate pages that I would like to synchronize. The first form displays
clients and I want to synchronize the second form to show purchases that
client has made. Can someone help?
 
A

Albert D. Kallal

You can *still* use the link master/child fields for this kind of setup.

However, since the forms are on different tabs, you *might* have to add a
requery to the purchases sub-form in the clients on-current event.

eg:

So, for the purchases sub-form, the link master/child settings would be:

linkChildFields main_id (whatever is the name of the field in
this sub-form that is used to relate back to the parent table -- in our case
the clietns)
LinkMasterFields [MasterForm].[form].[ID] ("masterForm" is the name of
the control you used to hold the master form - in this case the *control*
name used
for the clients sub-form -- note that the control name does not necessary
have to be the same name as the actually sub form used).

if the purchases for doe not update automatically for you, then you have to
put a requery in the on-current event of the clients form.

me.parent.PruchasesSubFormContorl.requery

So, at most you need one line of code..and it might even work without...
 

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