
Run -time error '13' Type Mismatch
Hello:
I'm thoroughly new at this, and could use some guidance.
In the following code, the
"Let rcount = rstInvoices.RecordCount" works properly, I can see through
Debug that it gets a good value..
Then I step through to next several lines though,
"Set avarRecords = rstInvoices.GetRows(rcount)"
results in "Run -time error '13' Type Mismatch"
Any suggestions ?
Thank-you
Paul
*******************************************************
Option Compare Database
Option Explicit
Sub invoice_data_p()
Dim dbs As Database
Dim rstInvoices As Recordset
Dim fldLoop As Field
Dim foggcode
Dim mfr
Dim model
Dim num_of_inv
Dim cable_qty
Dim strSQL
Dim qdf As QueryDef
Dim intRows As Integer
Dim avarRecords As Variant
Dim rcount As Integer
Set dbs = CurrentDb
Let intRows = 1
Set rstInvoices = _
dbs.OpenRecordset( _
"Select distinct acl4 from [Invoice data] order by acl4",
dbOpenDynaset)
Let rcount = rstInvoices.RecordCount
With rstInvoices ' Populate Recordset.
.MoveLast
.MoveFirst
Do While True
Set avarRecords = rstInvoices.GetRows(rcount)
Loop
End With
End Sub
*****************************************************************