Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tab control with subforms

Status
Not open for further replies.

signallt03

Technical User
Mar 14, 2003
21
US
I have a main form (frm_Cadet) on it there is a tab control with six different tabs. The first tab has a subform (frm_CDTInfo) it contains general information about each cadet ie. Name, SSN, Date of Birth.

The other tabs contain subforms linked to the first one, via SSN, with info about different tests and skills training.

I am using this form to both update and add new cadets to the database.

The problem I am running into is that when after i enter the main info on tab CadetInfo and then try to enter info on the next tab i get an error. "You cannot add or change a record because a related record is required in table "tbl_Cadet". the info for tbl_Cadet should be coming from the first tab.

Thanks
signalLT03
PRO PATRIA VIGILANS
"Watchful for the country"
 
When you reference the CadetSSN from the first tab form are you using the SSN number in the Parent/Child fields on the property pages..

Also... when you go to a subsiduary form for further info have you opened a new record related to the CadetSSN from tab 1 form.....

Have you requeried the form so that the information can be written to the tables......

enough to be going on with!
 
If you close the form and then reopen it after the SSN entry on the 1st tab, does it then let you continue, or does it still say you need a related record? If it lets you continue, then you need to do a requery after the save.
Let me know if this is the case, otherwise, I have another solution that is sure to work.

Also, WHere is the SSN that the subforms are linkled to? On the Main form? and then each subform is lionked to it?

JDTTEK
 
jdttek-

Yes, when i close the form and then open it again it lets me continue and edit the other forms. Not when i click on the save button though. I tried messing around with the requery thing today but couldn't get it to work. Any help you can give me on this I would appreciate.
Also, the SSN that the subforms are linked to is on the main form

Thanks for you help
signalLT03
PRO PATRIA VIGILANS
Watchful for the Country
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top