hey everyone. can anyone look at my code and tell me what im doing wrong? im trying to open up a recordset with all rows from a table but when i do, it just has the first row. i know the sql string is correct because when i run it in the querry builder, it has all rows
Code:Option Compare Database Private Sub Report_Open(Cancel As Integer) On Error GoTo errorhandler Dim SelectStrings As String Dim MyRecordSets As Recordset Dim QuestionArrays As Variant Dim Counters As Integer SelectStrings = "Select * From tblQuestionResults" Set MyRecordSets = CurrentDb.OpenRecordset(SelectStrings) If Not MyRecordSets.EOF Then QuestionArrays = MyRecordSets.GetRows(MyRecordSets.RecordCount) Counter = MyRecordSets.RecordCount MsgBox (Counter) MyRecordSets.Close errorhandler: If Err.Number = 0 Then Else MsgBox (Err.Description) End If End Sub




Reply With Quote