I created a master table with ID(autonumber)as a primary key. Then I made a few tables with ID as their primary key, and it's a foreign key to the master table. In the relationship window I connected the relationship (it's a one to one relationship)
I then created a masterform for the master table. For each of the other tables I created forms also. On the master form I created tabbed panes. On each tabbed pain I used the subform control and put the other forms on it.
I checked by the properties of the subform control that the Link Master Field and Link Child Field are correct and it is. However, the ID does not appear in the subform as it should (once I begin entering data in the master form the ID in the subform should appear). So I made a fuction on the code for each subform that it has a variable that is assigned the ID from the Master Table. In the Form_Load (and I think I put it in the wrong place)I pass the ID from the master table to the subforms. It works for the first record only, whatever the first record is. However when I press next on the data control, once again the subform ID remains zero,the code I wrote doesn't work.
Where should I place the code. I thought each time next or previous record is pressed (with the data control) that the form reloads. But I think I'm probably wrong.
If anyone knows how to help me - please respond ASAP - it will be greatly appreciated.
eelsar
I then created a masterform for the master table. For each of the other tables I created forms also. On the master form I created tabbed panes. On each tabbed pain I used the subform control and put the other forms on it.
I checked by the properties of the subform control that the Link Master Field and Link Child Field are correct and it is. However, the ID does not appear in the subform as it should (once I begin entering data in the master form the ID in the subform should appear). So I made a fuction on the code for each subform that it has a variable that is assigned the ID from the Master Table. In the Form_Load (and I think I put it in the wrong place)I pass the ID from the master table to the subforms. It works for the first record only, whatever the first record is. However when I press next on the data control, once again the subform ID remains zero,the code I wrote doesn't work.
Where should I place the code. I thought each time next or previous record is pressed (with the data control) that the form reloads. But I think I'm probably wrong.
If anyone knows how to help me - please respond ASAP - it will be greatly appreciated.
eelsar