I have a database that uses a printing function but ocasionally I get: Error 5. Invalid procedure call or invalid argument.
This is the way that I call the function from several subs:
This is the function declaration:
If I understand correctly, error 5 signifies that the data that is being sent to call the function is not being recognized by the function declaration, so the error has to be between the lines above. However, I fail to see what could possibly be wrong with this.
Any ideas?
Thanks
mafhobb
This is the way that I call the function from several subs:
Code:
Dim DocumentName As String
Dim DocumentType As String
Dim RecordID As String
DocumentName = "rptInvfrm"
DocumentType = "Document"
RecordID = Me.CallID
Call PrintingProcess(DocumentName, DocumentType, RecordID)
This is the function declaration:
Code:
Public Function PrintingProcess(DocumentName As String, DocumentType As String, RecordID As String) As String
If I understand correctly, error 5 signifies that the data that is being sent to call the function is not being recognized by the function declaration, so the error has to be between the lines above. However, I fail to see what could possibly be wrong with this.
Any ideas?
Thanks
mafhobb