I'v already done some research on database normalization but I can't find a solution to my specific problem.
I have a main table:
- Name: tblSteps
- Primary Key: StepID (Autonumber)
- StepName (Text)
- PartID1 (number)
- Qty1 (number)
- PartID2 (number)
- Qty2 (number)
- PartID3 (number)
- Qty3 (number)
- PartID4 (number)
- Qty4 (number)
And a secondary table:
- Name: tblParts
- Primary Key: PartID (Autonumber)
- PartNumber (number)
- PartDescription (text)
- PartPicture (attachment)
Also I have a form with:
- nameBox (textbox bounded to StepName field)
- qtyBox1 (textboxe bounded to qty1 field)
- qtyBox2 (textboxe bounded to qty2 field)
- qtyBox3 (textboxe bounded to qty3 field)
- qtyBox4 (textboxe bounded to qty4 field)
- cboPart1 (combobox with PartID, PartNumber and PartDescription as Rowsource, Controlsource = PartID1)
- cboPart2 (combobox with PartID, PartNumber and PartDescription as Rowsource, Controlsource = PartID2)
- cboPart3 (combobox with PartID, PartNumber and PartDescription as Rowsource, Controlsource = PartID3)
- cboPart4 (combobox with PartID, PartNumber and PartDescription as Rowsource, Controlsource = PartID4)
- Attachment1Box (attachmentfield)
- Attachment2Box (attachmentfield)
- Attachment3Box (attachmentfield)
- Attachment4Box (attachmentfield)
And there is also a button ("cmdCreate") to save all the values in the Controls to a new record in the tblSteps.
The user selects a part from the cboPart1 combobox which stores the selected value in the PartID1 field in tblSteps. When I press the "Create" button this value is stored to the record. But now I want to show the attachment (which is related to the PartID value selected in the combobox) in the Attachmentfield (Attachment1Box).
Is this actually possible with the Attachment Control Object?
Kind regards,
Jeroen.