Count selected record on Continuous Forms (1 Viewer)

mstres

Registered User.
Local time
Today, 00:07
Joined
Mar 18, 2009
Messages
24
How to Count selected record on Continuous Forms before delete this records?
Thank you
Mike
 

mstres

Registered User.
Local time
Today, 00:07
Joined
Mar 18, 2009
Messages
24
I found some code on google.
Function SelectedRecords()
Dim i As Long
Dim F As Form
Dim RS As Recordset

' Get the form and its recordset.
Set F = Forms![Location_Z_Detailed_frm]
Set RS = F.RecordsetClone
' Move to the first record in the recordset.
RS.MoveFirst
' Move to the first selected record.
RS.Move F.SelTop - 1
' Enumerate the list of selected records presenting
' the CompanyName field in a message box.
For i = 1 To F.SelHeight
'msgbox RS![Z_Site_Name]
RS.MoveNext
Next i
intSelectedRecords = i - 1
'Debug.Print i - 1
End Function
 

Users who are viewing this thread

Top Bottom