D
DS
I'm using this code on a delete key, the key is on a subform. There is
an unbound field [txtSubTotal] on the main form whenever I delete a
record in the Subform the [txtSubTotal] field is not updating.
Is the Syntax wrong?
Thank You
DS
Private Sub cmdDelete_Click()
On Error GoTo GotError
DoCmd.SetWarnings False 'turn system messages off
DoCmd.RunCommand acCmdDeleteRecord
Me.Parent!txtSubTotal.Recalc
DoCmd.SetWarnings True 'turn system messages on
ExitSub:
Exit Sub
GotError:
Select Case Err.Number
Case 3021
Resume ExitSub
Case 2465
Resume ExitSub
Case 3075
Resume ExitSub
Case Else
'MsgBox Err.Number & vbCrLf & Err.Description & vbCrLf & "Order
Details cmdDelete_Click"
Resume ExitSub
End Select
End Sub
an unbound field [txtSubTotal] on the main form whenever I delete a
record in the Subform the [txtSubTotal] field is not updating.
Is the Syntax wrong?
Thank You
DS
Private Sub cmdDelete_Click()
On Error GoTo GotError
DoCmd.SetWarnings False 'turn system messages off
DoCmd.RunCommand acCmdDeleteRecord
Me.Parent!txtSubTotal.Recalc
DoCmd.SetWarnings True 'turn system messages on
ExitSub:
Exit Sub
GotError:
Select Case Err.Number
Case 3021
Resume ExitSub
Case 2465
Resume ExitSub
Case 3075
Resume ExitSub
Case Else
'MsgBox Err.Number & vbCrLf & Err.Description & vbCrLf & "Order
Details cmdDelete_Click"
Resume ExitSub
End Select
End Sub