If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
BeforeDelConfirm event
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 |
#2
|
|||
|
|||
BeforeDelConfirm event
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... -- NTC "smk23" wrote: 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 |
Thread Tools | |
Display Modes | |
|
|