Hi,
I'm having trouble passing an array to a function,
like this:
Dim sFieldsNotRequired(11), sFieldsWithSpecificValues(5) As String
Dim sCaseErrMsgs As String
Dim vFieldsSpecificValues(5) As Variant
sFieldsNotRequired(0) = "middleName"
etc...
sFieldsWithSpecificValues(0) = "InfoRecd"
etc...
vFieldsSpecificValues(0) = True
etc...
Dim sCaseSQL As String
sRecSQL = "SELECT * from table WHERE ID = " & iID
Dim bInfoValidates As Boolean
bInfoValidates = CheckRecordset(sSQL, sFieldsNotRequired(),_
sFieldsWithSpecificValues(), _
vFieldsSpecificValues(), sCaseErrMsgs)
Where
CheckRecordset is defined as:
Function CheckRecordset(sRecordsetSQL As String, sFieldsNotRequired() As
String, _
sFieldsWithSpecificValues() As String, _
vFieldsSpecificValues() As Variant,
sErrMessages As String) As Boolean
The trouble is I get the error:
type mismatch array or user-defined type expected
This is also true when I call the function as
bInfoValidates = CheckRecordset(sSQL, sFieldsNotRequired,_
sFieldsWithSpecificValues, _
vFieldsSpecificValues, sCaseErrMsgs)
can somebody give me some clues as to what's going on?
Thanks,
Eric