Tab Control Question

H

Hey

Hi,

In A2K, is there a way to run, say a requery, on the source for the form if
you click on the different tabs on a tab-control page?

I have a form with a tab control with say 3 tabs. Main client data (name,
address, phone, etc) on first tab, 2nd tab has say.... cars owned and all
the particulars of the cars (mileage, vin #, Lic #, color, make, model,
etc), 3rd tab has, say... all the drivers with their particulars (dob,
height, weight, hair color, etc) yada yada.

For the operators, it became easiest to have the cars listed on the front
client tab as well--not accessible, just listed. So, a little query based
area set aside, in a different color, lists the cars for a client (up to 3).
However, find a specific client, click on the car tab and add a new car,
click back to the main client tab...........and the new addition isn't there
yet. Sure, clicking previous then next arrows on the main client screen
will "refresh" the info and show the newest input along with the old stuff
but that seems pretty cludgy. Seems like there should be something in
changing tabs that can help here. Is there?

me
 
J

Jeanette Cunningham

Seems like you should be able to force a requery of that little area set
aside for the cars for a client.

If the cars for a client were in a subform (the bit shown on the tab with
main client data), after a new car is added, your code would do
Me.Parent.NameOfSubformControl.Requery

Doing this form memory, so the syntax may need to be-->
Me.ParentFormName.NameOfSubformControl.Form.Requery
- assuming this code is called from the subform where you are adding or
editing the new car details.

If your table and form-subform structure is more complicated, the syntax for
the requery may need some tweaking.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
H

Hey

The first option you supplied works like a charm. Interesting that it has
really nothing to do with the tab controls and using such. I'll have to
remember that for the future.

Thanks so much for taking your time to help.
me
 

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