Run -time error '13' Type Mismatch 
Author Message
 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

*****************************************************************



Wed, 28 Jun 2000 03:00:00 GMT  
 Run -time error '13' Type Mismatch

I've never used GetRows, but I ran your code and noticed the Set statement
in front of the offending line isn't required. (you don't need the let
statement either by the way). It still doesn't run properly, but at least
the error message changes to something easier to identify.



Thu, 29 Jun 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ACC2000:Run Time Error '13': Type Mismatch

2. Run-time error '13': Type mismatch

3. Run-time error '13': Type mismatch

4. Run-time error '13': Type mismatch

5. Attachment Filename: Run Time Error '13' (Type Mismatch)

6. Openrecordset and run-time Error '13' Type Mismatch

7. Keep getting run-time error '13' Type Mismatch

8. type mismatch error '13'????

9. Urgent: runtime error '13' type mismatch

10. runtimer error '13' type mismatch

11. Type Mismatch Run-Time error 13

 

 
Powered by phpBB® Forum Software