
newbie: array to function getting type mis-match
Hello I am Passing an Array to a function and I am getting a type mis-match ... Help
code
Dim ObjAcc, ObjDBE, ObjDB, rs, Column, Row, Body1
Set objAcc = WScript.CreateObject("Access.Application")
Set objDBE = objAcc.DBEngine
Set objDB = objdbe.OpenDatabase("h:\inetpub\wwwroot\kbhd\db2.mdb")
Set rs = objDB.OpenRecordset("jobs")
'count jobs per tech
jim1 = 0
kay = 0
tam = 0
paul = 0
mar = 0
rs.movefirst
Do until rs.eof
tech1 = rs.Fields("tech").Value
status = rs.Fields("status").Value
If status = "open" Then
If tech1 = "jim" Then
jim1 = jim1 + 1
msgbox(jim1)
End If
If tech1 = "kay" Then
kay1 = kay1 + 1
End If
If tech1 = "tam" Then
tam1 = tam1 + 1
End If
If tech1 = "paul" Then
paul1 = paul1 + 1
End If
End If
rs.movenext
Loop
'############################################
' add results to DB
'############################################
dim techs(5)
techs(0) = jim1
techs(1) = tam
techs(2) = kay
techs(3) = paul
' techs(4) = mar
'
low_one(techs)
Function low_one(techs)
i = 0
check1 = tech(i)
end Function
thanks in advance