BeforeDelConfirm event

  • Thread starter Thread starter smk23
  • Start date Start date
S

smk23

I would like to get the recordID of the Record being deleted on a subform
with the BeforeDelConfirm event. When I select the record and click Delete,
the value of Me.RecordID is 0, rather than the value of the RecordID that is
selected. How can I get the value of RecordID for the selected record? My
code is a simple:

Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
mlngRecordID = Me.RecordID
End Sub

where mlngRecordId is previously defined as a long variable.
Thanks,

Sam
 
I don't totally follow what you mean.....but you can easily populate a
subform textbox from a mainform textbox using the mainform's 'OnCurrent'
event...

this will populate the subform textbox will before the mainform record is
deleted...
 
Back
Top