I'm not sure if I interpret your request exactly, but the following code will list each Row Number, and each of the 3 Column Values in a List Box named List0. The Row Source of the List Box is taken from values within the Employees Table of the Northwind Database.
- Dim intNumberOfEntries As Integer
-
Dim intCounter As Integer
-
-
intNumberOfEntries = Me![List0].ListCount
-
-
If intNumberOfEntries > 0 Then
-
With Me![List0]
-
For intCounter = 0 To intNumberOfEntries - 1
-
-
Debug.Print "Row: " & intCounter + 1 & " | " & .Column(0, intCounter) & " | " & .Column(1, intCounter) & _
-
" | " & .Column(2, intCounter)
-
Next
-
End With
-
End If
OUTPUT:
Row: 1 | Sales Representative | Nancy | Davolio
Row: 2 | Vice President, Sales | Andrew | Fuller
Row: 3 | Sales Representative | Janet | Leverling
Row: 4 | Sales Representative | Margaret | Peacock
Row: 5 | Sales Manager | Steven | Buchanan
Row: 6 | Sales Representative | Michael | Suyama
Row: 7 | Sales Representative | Robert | King
Row: 8 | Inside Sales Coordinator | Laura | Callahan
Row: 9 | Sales Representative | Anne | Dodsworth