Hi All,
I have unique challenge. I have a main form that connects two subforms. Each subform get's it's data from 2 different queries/tables. But I have data in both forms that need to be updated into a different table. I want to use the UPDATE statement on a click button event. Am I on the right track with this statement? :
Private Sub TEST_UPDATE_Click()
Update "Order Details" 'My table to update
Set QtyShipped = [Forms]![frmCustShipment]![subCustOKShip].[Form]!Me![Qty2Ship] 'I want to update QtyShipped from Qty2Ship
PSID = [Forms]![frmCustShipment]![subCustShipment2].[Form]!Me![PSID] 'Same idea as line one
DateShipped = [Forms]![frmCustShipment]![subCustShipment2].[Form]!Me![ShipDate] 'Same idea as line one
FROM [Forms]![frmCustShipment] 'This is the main form that has both subforms that are getting the field data from
WHERE ODID = [Forms]![frmCustShipment]![subCustOKShip].[Form]!Me![ODID] 'this is the identifier that finds the exact record to update
End Sub
Or do I need to do two separate Updates from tables only after the records are saved?
Thank you for your input?
Heidi
I have unique challenge. I have a main form that connects two subforms. Each subform get's it's data from 2 different queries/tables. But I have data in both forms that need to be updated into a different table. I want to use the UPDATE statement on a click button event. Am I on the right track with this statement? :
Private Sub TEST_UPDATE_Click()
Update "Order Details" 'My table to update
Set QtyShipped = [Forms]![frmCustShipment]![subCustOKShip].[Form]!Me![Qty2Ship] 'I want to update QtyShipped from Qty2Ship
PSID = [Forms]![frmCustShipment]![subCustShipment2].[Form]!Me![PSID] 'Same idea as line one
DateShipped = [Forms]![frmCustShipment]![subCustShipment2].[Form]!Me![ShipDate] 'Same idea as line one
FROM [Forms]![frmCustShipment] 'This is the main form that has both subforms that are getting the field data from
WHERE ODID = [Forms]![frmCustShipment]![subCustOKShip].[Form]!Me![ODID] 'this is the identifier that finds the exact record to update
End Sub
Or do I need to do two separate Updates from tables only after the records are saved?
Thank you for your input?
Heidi