BeforeDelConfirm event

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
 
N

NetworkTrade

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top