Im trying to pass a report to a function. If I define the argument as being CRAXDRT.Report none of the objects I have on my form are referenced anymore. Using Variant or Object does not work either. I can't actually use the name of the report either. Here's what I want to do:
VB Code:
Private Sub OneSub (param as Integer) Dim InvM1 as MyCRReport1 Dim InvM2 as MyCRReport2 Dim InvM3 as MyCRReport3 Select Case param Case 0 Call MyFunction(InvM1) Case 2 Call MyFunction(InvM2) Case 3 Call MyFunction(InvM3) End Select End Sub Public Function MyFunction(InvMReport As ??) End Function
Any idea?




Reply With Quote