Need form to act like a subform

Carnafex

Registered User.
Local time
Today, 20:50
Joined
Jan 19, 2004
Messages
38
This is a problem for all you Access gurus out there, perhaps you can help me, since Im stumped.
So this is the problem: I have a large database that handles personnel data, and it happens that one particular section is very complex.
So there are 2 tables, Personnel and Review, with one Personel to many Reviews.
The table(personnnel review) is a one-many relationship with the main form (meaning one person has many reviews).
With this review though, I needed to create an entirely new form as there is way too much data to display in a subform on the main form.
However, now whenever I try to edit data in the new form (when the main form is open), it chucks an error and says "You cant add or change a record because a related record is required in the table 'Personel'".
I understand what the error means, but Im still stumped as to get the Review form to think its a subform of the Personel main form.

Hopefully this makes sense, just ask if you need any more data.
Thanks
Jason
 
If you have that much data from a record source then I would suggest adding a Tab Control to your form. Tabs are a great way to organize and group your data by tab and allows you keep all of the data in one form.

HTH
 
Thanks for the reply, i'll give it a shot
Thanks
Jason
 
I got the tab control all setup, although now Im stumped with another problem. (ill call the subforms A and B.
I turned the form into a subform and put it onto a new tab. Now I need to control subform B from subform A.
By this I mean that subform A has multiple records, and when you select one, subform B should update to show the info related to the selected record on A.
If I could get some help on this, it would be greatly appreciated.

Thanks
Jason
 
The problem with your first solution was that you needed to save the current record in form A before opening formB. You would do that with:
DoCmd.RunCommand acCmdSaveRecord

The second problem is much like the cascading combo problem and the solution is the same. Base the second subform on a query that references the key field of subform A. Then in the Current Event of SubA, requery SubB. In the AfterInsert event of SubA, requery SubB.
 
It worked perfectly, thanks for the help.

Cyas
Jason
 

Users who are viewing this thread

Back
Top Bottom