Form tab control to link to ID

munkeyroot

Registered User.
Local time
Today, 10:55
Joined
Jan 13, 2011
Messages
76
Hi hope any one can help, I am a reptile breeder and I am trying to make a database to log all reptiles and when they fed etc.
I am working in access 2007
I have a form with a tab control, 1st tab is details and the second tab is health.
The details TAB has Key ID and other attributes that do not change.
The Health TAB has Key ID but has column subform so I can add in on going data, when fed and fed what etc. my problem is on the health TAB it show all the data not just for that reptile, how do I get it so the details and Health tab are linked so it would only bring up the details for that particular reptile? Hope u can help
Kind regards
Matt
 
Matt,

* Does the Details tab contain a subform? What's the Default View?
* Does the Health tab contain a subform? What's the Default View?
* Is ID the field that you want to use to link both "tabs"?
 
Hi thanks for getting back to me.
I have a blank form called snakes, that contains a Tab Control with 2 tabs "Details" and "Health"
The Details tab has a subform called SDetails which is in form layout containing ID Key and attributes.
The Health tab has a data sheet subform called SHealth with ID Key and attributes so I can fill in on going data.
The default view is single form with a Tab control dropped on to it.
If it is possible to link the ID's together would be great but what would you advise?
Cheers Matt
 
So basically you want to link the details subform with the health subform. A tab is just for layout so you don't necessarily link tabs together, you link the subforms contained within the tab.

Here are the steps:

1. Drop a textbox onto the Main form (i.e. not the subforms, but the main form) and call it txtLink
2. Link txtLink to the ID field in the SDetails suborm, so you would put something like this in the Control Source:
Code:
=SDetails.Form!ID
3. Type txtLink in the Link Master Fields property of the SHeath subform control. Don't click the button in this property, you have to type it in or copy and paste.
4. Type ID (if this is the name of the ID field) in the Link Child Fields property of the SHealth subform control. Again, it must be typed in or copied and pasted.
 
Hi mate
Just done what you said and brill it worked, your a star mate
Thank you very much for your help
Kind regards
 

Users who are viewing this thread

Back
Top Bottom