Please tell us more about this
Perhaps you could give us a realistic example of exactly what you mean.
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..