|
-
Aug 22nd, 1999, 03:19 PM
#1
Thread Starter
Addicted Member
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
-
Aug 23rd, 1999, 12:44 AM
#2
Junior Member
Don't call a Sub that returns nothing with parens around the arguments.
Use
getNextCustomerNumber lrs_customer_number
instead of
getNextCustomerNumber (lrs_customer_number)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|