Place a number from the form in the subform

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

I have a autonumber for my pallet number. In a subform I need to place the
pallet number in another box which tracks where the products was
dispersed...

May sound a little confusing. In my subform I have date, orderID, palletID,
weight, packaging and so on.. I need to keep a record of how many kilos of
this product were used on which order. Each line in my table needs to have
the palletID that was assigned to the product when it was received.

thank you
Michael
 
Michael, you have 2 tables here:
- the main form table has the PalletNumber as its primary key, and
- the subform table has PalletNumber as a foreign key?

If so, you can just use the LinkMasterFields and LinkChildFields, and Access
will assign the foreign key field for you.

1. Open the main form in design view.

2. Right-click the edge of the subform control, and choose Properties.

3. On the Data tab of the properties box, set LinkMasterFields to the name
of the main form's table's primary key.

4. Set the LinkChildFields property to the name of the matching field in the
subform.
 
Thank you Allen.
Michael
Allen Browne said:
Michael, you have 2 tables here:
- the main form table has the PalletNumber as its primary key, and
- the subform table has PalletNumber as a foreign key?

If so, you can just use the LinkMasterFields and LinkChildFields, and
Access will assign the foreign key field for you.

1. Open the main form in design view.

2. Right-click the edge of the subform control, and choose Properties.

3. On the Data tab of the properties box, set LinkMasterFields to the name
of the main form's table's primary key.

4. Set the LinkChildFields property to the name of the matching field in
the subform.
 
Back
Top