Add record to DS using combo

alorenzini

Registered User.
Local time
Today, 08:41
Joined
Oct 16, 2007
Messages
25
I am trying to create a form with a datasheet subform. The datasheet is based on the tblMaterial:

MaterialID
WorkorderID
PartID
Description
UnitCost
Quantity
Notes

The PartID is a lookup to tblMaterial which contains the following fields:

PartID
PartCode
PartName
UnitCost
Notes

I would like to create a combobox called cboProduct with the following record Source:

SELECT [tblPart].[PartID], [tblPart].[PartCode], [tblPart].[PartName], [tblPart].[UnitPrice] FROM tblPart;

And by clicking cmdAddPrduct it would insert the specific fields into the approriate fields in the DS. The workorderID will be passed by Args from the main form.

Any ideas?
 

Users who are viewing this thread

Back
Top Bottom