View Full Version : Syntax for passing parameters to procedure


jal
09-25-2008, 08:18 AM
I am getting a "type mismatch error" when tryijng to pass in two recordsets to a sub. (I'm a beginner at vba).


Private Sub AddThisEobToTable835(ByVal textForThisEob As String, ByRef recSet As Recordset, ByRef RecSetob As Recordset)

Incidentally I don't undestand why "Recordset" is listed twice in Intellisense.

The error occurs when I call the sub like this:


AddThisEobToTable835 eob.Text, recSet, RecSetob


The first parameter (Eob.text) is fine because I originally passed in this value alone. It's only when I modified the sub's definition to accept two recordsets that the error occurs.

jal
09-25-2008, 08:20 AM
I am getting a "type mismatch error" when tryijng to pass in two recordsets to a sub. (I'm a beginner at vba).


Private Sub AddThisEobToTable835(ByVal textForThisEob As String, ByRef recSet As Recordset, ByRef RecSetob As Recordset)

Incidentally I don't undestand why "Recordset" is listed twice in Intellisense.

The error occurs when I call the sub like this:


AddThisEobToTable835 eob.Text, recSet, RecSetob


The first parameter (Eob.text) is fine because I originally passed in this value alone. It's only when I modified the sub's definition to accept two recordsets that the error occurs.

Ok, I guess I had to qualify it as Adodb.Recordset.

I spose' this is different than DAO.recordset or whatever.