i wanna test pass by reference and pass by value in access, but it doesn’t work.
Sub passByRef(ByRef a As Integer)
a = a + 1
End Sub
Sub passByVal(ByVal a As Integer)
a = a + 1
End Sub
Private Sub cmdByRef()
Dim i as Integer
i = 10
passByRef i
MsgBox i
End Sub
Private Sub cmdByVal()
Dim i as Integer
i = 10
passByVal i
MsgBox i
End Sub
in the pass by ref it does not state that it is the pass by reference function. Any idea?
1 Answer