Option Compare Database
Option Explicit
Private Selection_Height As Integer
Private Selection_Top As Integer
Private Sub Btn_GO_Click()
Dim s As String
Dim i As Integer
With Me.Products_Subform.Form.RecordsetClone
.MoveFirst
.Move (Selection_Top - 1)
For i = 1 To Selection_Height
s = s + !ProductName + vbCrLf
.MoveNext
Next
End With
If s = "" Then
MsgBox "Nothing Selected", vbExclamation, ""
Else
MsgBox s, , "Selected Items"
End If
End Sub
Private Sub Products_Subform_Exit(Cancel As Integer)
With Me.Products_Subform.Form
Selection_Height = .SelHeight
Selection_Top = .SelTop
End With
End Sub