Hi,
can anyone point out what is wrong with the following code. What I want to do is pass a complete rcordset to a function. When I run it I get a type mismatch error.

Thanks in advance.

Tony.


Public Sub do_report()

'Get the recordset for all customers
Dim lrs_customer_number as adodb.recordset
Call de.customer_id
Set lrs_customer_number = de.rscustomer_id

lrs_customer_number.MoveFirst

Do Until lrs_customer_number.EOF
getNextCustomerNumber (lrs_customer_number)
Loop


End Sub

Public Sub getNextCustomerNumber(customerNumberRecordset As Recordset)

MsgBox lrs_customer_number.Fields("num")

End Sub