A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

BeforeDelConfirm event



 
 
Thread Tools Display Modes
  #1  
Old April 8th, 2008, 12:08 AM posted to microsoft.public.access.forms
smk23
external usenet poster
 
Posts: 62
Default 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  
Old April 8th, 2008, 03:13 AM posted to microsoft.public.access.forms
NetworkTrade
external usenet poster
 
Posts: 825
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:46 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.