See the code below. I want to enter into the sub with the name of the form as a string. I will need to refer to that form directly later. I wish to do this by using syntax similar to what the code below.
I would appreciate help in fixing that code.
Public Sub CheckDuplicates(ByVal FormName As String, ByRef lblCommunicate As Label)
Dim TheForm As Form: Set TheForm = Forms(FormName)