Hello,
I have a main form (frmMain) that holds the field (cboAssetNumber) and a subform (fsubbrokers) that holds the field (VendorID). The subform has an "Assign" command button. When this is clicked I want it to update the table tblVendorAssignment. This is the code I have.
I am able to update the table with the vendorId and date, but cannot figure out how to update the main form (cboAssetnumber) to the table
Thanks for your help!
I have a main form (frmMain) that holds the field (cboAssetNumber) and a subform (fsubbrokers) that holds the field (VendorID). The subform has an "Assign" command button. When this is clicked I want it to update the table tblVendorAssignment. This is the code I have.
Code:
DoCmd.RunSQL "INSERT INTO tblVendorAssignment (AssignDate, VendorID, AssetNumber) VALUES (#" & Format(Me.txtcurrdate, "mm/dd/yyyy") & "#, '" & Me.txtVendorID & "', '" & Me.frmMain.cboAssetNumber & "')"
I am able to update the table with the vendorId and date, but cannot figure out how to update the main form (cboAssetnumber) to the table
Thanks for your help!