S
Scott
I'm getting a "ByRef argument type mismatch" error when I call my function
from the IMMEDIATE WINDOW as below. I use syntax like this all the time in
my ASP web pages, but Access doesn't like my ByRef syntax.
What is wrong with my declaration of ByRef variables below? The variables
sReport and sReportName are empty when I call this function and I just wish
the return them equal to my test values.
CODE **********
Public Function GetNamesTest(ByVal myID As Integer, ByRef sReport As String,
_
ByRef sReportName As String)
sReport = "test1"
sReportName = "test2"
Debug.Print sReport
Debug.Print sReportName
End Function
IMMEDIATE WINDOW ********
Call GetNamesTest("14", sReport, sReportName)
from the IMMEDIATE WINDOW as below. I use syntax like this all the time in
my ASP web pages, but Access doesn't like my ByRef syntax.
What is wrong with my declaration of ByRef variables below? The variables
sReport and sReportName are empty when I call this function and I just wish
the return them equal to my test values.
CODE **********
Public Function GetNamesTest(ByVal myID As Integer, ByRef sReport As String,
_
ByRef sReportName As String)
sReport = "test1"
sReportName = "test2"
Debug.Print sReport
Debug.Print sReportName
End Function
IMMEDIATE WINDOW ********
Call GetNamesTest("14", sReport, sReportName)