Help!
I have an Access 2013 application that worked fine until I run it from Access 365, (whatever that version is), I don't know. I have a form that has a listbox which has an ADODB recordset bound to it.
The recordset pulls 55 rows. After I set the recordset property of the listbox to the Recordset it only shows the first row in the recordset data. The items collection of the listbox is also only showing 1 item.
???
Dim sql As String
'Dim cn As ADODB.Connection
Dim RS As ADODB.Recordset
sql = "Select DeliveryID,ShipDate from Deliveries where CustomerID = " & Me.cboCustomer & " ORDER BY ShipDate DESC"
Set RS = New ADODB.Recordset
ConnectData()
With RS
.CacheSize = 1000
.ActiveConnection = gblConn
.Source = sql
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.Open
End With
Dim str As String
If RS.EOF And RS.BOF Then MsgBox "No Deliveries found for this customer": Exit Sub
'Set the list box's Recordset property to the ADO recordset
'at this point the RS shows 55 rows
Set Me.lboDeliveries.Recordset = RS
'at this point the listbox displays only the first row of the recordset