retrieve some values before delete record

irade92

Registered User.
Local time
Today, 20:40
Joined
Dec 26, 2010
Messages
229
I have a query in a subform related with main form with master and child filed for certain criteria i.e date...Also I have a button in main form to delete what ever record...Fist I choose a record from subform and then click on button to delete it..I use this code:
If (Not Form.NewRecord) Then

intAnswer = MsgBox("Are u sure", vbYesNo + vbQuestion, "Delete record")

If intAnswer = vbYes Then

DoCmd.RunCommand acCmdDeleteRecord
Else
DoCmd.RunCommand acCmdUndo
End If

End If

If (Form.NewRecord And Not Form.Dirty) Then
Beep
End If

If (Form.NewRecord And Form.Dirty) Then
DoCmd.RunCommand acCmdUndo
End If
and this work fine....I want to retrieve some value from this record before I delete it i.e like Id and DATE so I can find that value in another table to delete another record..
 

Users who are viewing this thread

Back
Top Bottom