I have a subform that displays part information on a master form. (The subform is on a tab display).
In the AfterUpdate event of the Serial Number control (on the subform) I have this code:
If Me.SerialNumber <> "TBD" Then
TransactionDate = Now()
StatusId = 2
DateReceived = Now()
DoCmd.RunCommand acCmdSaveRecord
End If
As the user updates the Serial Number with a valid number, the statusId and DateReceived fields are updated immediately as the user moves to the next record - which is what I want to happen.... but the TransactionDate field never updates until I close the form and reopen or click on another subform tab and return to the subform.
I have tried Form.Requery but that will lose the current record focus and the user is placed at the first record.
I'd like to understand why StatusId and DateRecieved will update immediately but the TransactionDate will not ? Is there another method I can use to update that field without losing current record focus?
Thanks
In the AfterUpdate event of the Serial Number control (on the subform) I have this code:
If Me.SerialNumber <> "TBD" Then
TransactionDate = Now()
StatusId = 2
DateReceived = Now()
DoCmd.RunCommand acCmdSaveRecord
End If
As the user updates the Serial Number with a valid number, the statusId and DateReceived fields are updated immediately as the user moves to the next record - which is what I want to happen.... but the TransactionDate field never updates until I close the form and reopen or click on another subform tab and return to the subform.
I have tried Form.Requery but that will lose the current record focus and the user is placed at the first record.
I'd like to understand why StatusId and DateRecieved will update immediately but the TransactionDate will not ? Is there another method I can use to update that field without losing current record focus?
Thanks