M
Mercadogs
Greetings!
Is it possible to concatenate the "Me" keyword with a variable declared in
a VBA code? I need to know because I would like to make a function that would
could use the names of different controls as parameters.
Everything I've tried doesn't work and I can't find an answer Online.
See an example below of one of the attempts I've tried:
NOTE: I am simply interested in find out if such a concatenation is
possible, not an evaluation of the code... Thanks! -Gabriel
......................................................................................
Private Sub Search_Click()
Dim crit_1 As String
Dim crit_2 As String
crit_1 = Me.&Crit_2 ' Where Crit_2 would be the name of a control
End Sub
............................................................................................
Is it possible to concatenate the "Me" keyword with a variable declared in
a VBA code? I need to know because I would like to make a function that would
could use the names of different controls as parameters.
Everything I've tried doesn't work and I can't find an answer Online.
See an example below of one of the attempts I've tried:
NOTE: I am simply interested in find out if such a concatenation is
possible, not an evaluation of the code... Thanks! -Gabriel
......................................................................................
Private Sub Search_Click()
Dim crit_1 As String
Dim crit_2 As String
crit_1 = Me.&Crit_2 ' Where Crit_2 would be the name of a control
End Sub
............................................................................................