Canceling DELETE

timothyl

Registered User.
Local time
Today, 11:51
Joined
Jun 4, 2009
Messages
92
Hello, I have a form, sales staff use for spects to build a demo wheel chair, they complete and they save it. 5 minutes later they go wait I don't need that.
It needs to be deleted. This is not a problem. But form, on save has set

Status = "Committed"
Storage = "OUT"

Adding this back in is not the problem

sales staff find record to be deleted click then decide no i want to keep this as is.

This is my problem. on click I have reset the table to status = "Available" and Storage = " its last location" , how do I re-reset status = " committed" and Storage = " Out". Below is my effort which works but for this last part.

Private Sub cmdDelete_Click()
On Error GoTo Err_cmdDelete_Click


Me.Status.Value = "Available"
Me.StorageLocation.Value = Me.PhoStorage.Value


DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord

Exit_cmdDelete_Click:

If Cancel = True Then
Me.StorageLocation.Value = "OUT"
Me.Status.Value = "Committed"
End If
Exit Sub

Err_cmdDelete_Click:
MsgBox Err.Description
Resume Exit_cmdDelete_Click

End Sub
 

Users who are viewing this thread

Back
Top Bottom