R
Rolf
Hello!
I have a subform with the fields itemID, unit, quantity and batch from the
table tblOrderdetails. The itemID, unit and batch are related to the
tblItemreg.
When you choose the itemID in the subform an AfterUpdate-event inserts the
unit and batch to its corresponding field in the subform (Dlookup-function).
I would like to update the batch in the tblItemreg from the batch-field in
the subform. E.g. after choosing itemID I will move to the batch-field and
update it if necessary. I'm using the following SQL in the AfterUpdate-event
for the batch-field, but I only get the warning-message that tells me that
I'm up to update 0 records.
strSQL = "UPDATE tblItemreg SET batch = '& Me.batch &'"
strSQL = strSQL + " WHERE (([itemID]) = '& Me.itemID &')"
strSQL = strSQL + ";"
DoCmd.RunSQL strSQL
Why isn't the record being updated?
I have a subform with the fields itemID, unit, quantity and batch from the
table tblOrderdetails. The itemID, unit and batch are related to the
tblItemreg.
When you choose the itemID in the subform an AfterUpdate-event inserts the
unit and batch to its corresponding field in the subform (Dlookup-function).
I would like to update the batch in the tblItemreg from the batch-field in
the subform. E.g. after choosing itemID I will move to the batch-field and
update it if necessary. I'm using the following SQL in the AfterUpdate-event
for the batch-field, but I only get the warning-message that tells me that
I'm up to update 0 records.
strSQL = "UPDATE tblItemreg SET batch = '& Me.batch &'"
strSQL = strSQL + " WHERE (([itemID]) = '& Me.itemID &')"
strSQL = strSQL + ";"
DoCmd.RunSQL strSQL
Why isn't the record being updated?