Hello everyone.
I would like to ask, what is the difference between the 2 following cases:
1.
Code:
Dim strFormName As String
strFormName = Left$(Me.OpenArgs, intPos - 1)
Forms("frm_Meds").Controls("" & strFormName & "").Form!cbo_Med.Requery
where strFormName = frm_Meds
2.
Code:
Dim strFormName As String
strFormName = Chr(34) & Left$(Me.OpenArgs, intPos - 1) & Chr(34)
Forms("frm_Meds").Controls(strFormName).Form!cbo_Med.Requery
where strFormName = "frm_Meds"
In the 1st case everything works ok.
In the 2nd case I get an '2465' run-time error: The database can't find the field "frm_Meds" referred to in your expression
I would expect that it would be the same, but clearly, it isn't. Why's that?