I think this is just a simple tweak. I'm trying to create a module in which I can pass keywords and reuse the same code to generate some pricing on the form. I would pass words like Full, Mid, Basic as the SolutionType.
How do I reference components of a form using a constructed string? Make sense? I tried fishing for sample code and just didn't see how to do this. I'm sure I'm overlooking something simple. Thanks in advance.
Code:
Function MyFunctionName(SolutionType As String)
Dim sumListPrice As Currency
Dim FormName As String
FormName = "Form_embed" & SolutionType
'results in Form_embedFull when Full is passed to the function"
sumListPrice = Nz(Form_embedFull.List_Price, 0)
'the above works
sumListPrice = Nz(FormName.List_Price, 0)
'the above is an invalid qualifier
End Function
How do I reference components of a form using a constructed string? Make sense? I tried fishing for sample code and just didn't see how to do this. I'm sure I'm overlooking something simple. Thanks in advance.