وعليكم السلام ورحمة الله وبركاته أخي عمر 🙂
هذا حسبما فهمت .. عملت فكرتين ..
ضع هذا الكود في حدث عند الإغلاق :
Private Sub Form_Close()
Dim x As Integer
'----------------------------------------------(الفكرة الأولى)
DoCmd.GoToRecord , , acFirst
For x = 1 To Me.Recordset.RecordCount
MsgBox Me.n
DoCmd.GoToRecord , , acNext
Next
'----------------------------------------------(الفكرة الثانية)
Dim txt As String
DoCmd.GoToRecord , , acFirst
For x = 1 To Me.Recordset.RecordCount
txt = txt & Me.n & vbNewLine
DoCmd.GoToRecord , , acNext
Next
MsgBox txt
End Sub
aa.accdb