Event Code for Tab Control

painterz

Registered User.
Local time
Today, 14:16
Joined
Nov 29, 2012
Messages
182
Hi All,

I had a form (Address) containing a subform (People) and the main form was based on a query, qryNeighbors--everything worked.

Then I realized I actually needed a tab control to show multiple families living at the address. So each tab would represent a family and contain the subform.

My goal is to write code using SELECT DISTINCT to pull out the FamilyID(s) of each family and then feed it through qryNeighbors for the data and place it in the subform on the tab page.

I think it probably goes in the OnLoad event of Address form. Is this the best place to put it? Is there an easier way to show one family per tab without writing code? I know there isn't a recordsource for a tab control, is there something else that will work more smoothly? I feel like I'm reinventing the wheel.

Thank you for taking the time to ponder this problem.
 

Attachments

  • FrmwTabCtrl.png
    FrmwTabCtrl.png
    39.3 KB · Views: 123
  • TableRel.png
    TableRel.png
    19.9 KB · Views: 120
Last edited:
I would use a sub-from/list-control, (placed to the left), showing Family 1, Family 2, Family .. instead of the tab-control.
 
That sounds interesting--what does it look like? Do you have a screen shot?
 
That sounds interesting--what does it look like? Do you have a screen shot?
Not exactly concerning families, but if you imagine that where the years are listed that it shows "Family 1", "Family 2", "Family .."
attachment.php
 

Attachments

  • Fam.jpg
    Fam.jpg
    64.4 KB · Views: 182
Sorry for the late response. I really like this idea! I would actually have a recordsource to sort the families and that will need less coding. Thank you!!! :)
 

Users who are viewing this thread

Back
Top Bottom