Place a number from the form in the subform

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
 
A

Allen Browne

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.
 
M

Michael

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top