Add data from two subforms into one record.

upsman

Registered User.
Local time
Today, 11:45
Joined
Jul 22, 2005
Messages
26
I have two subforms on a tabbed page. Both subforms read/write data from the same table. The first subform is in dataset view and consists of 5-6 fields on the line containing class information. The second subform consists of two memo-type fields where users can enter comments. The fields from both subforms should be written to the same record in the table. The problem is that
the information from the second subform is being written to a different table record; it is creating a new autonumber. The data is being written to two separate records instead of being combined into one.

How do I link the two subforms so that the data gets written to the same record in the table so that the class information and it's related comments stay together?
 
Place an invisible TextBox on the MainForm with a ControlSource of the ID of the record you are working on. Set the Link Master Field of both SubForms to this TextBox and the Link Child Field to their respective RecordSource ID field or control.
 

Users who are viewing this thread

Back
Top Bottom