B
Brent Yager
Can I dynamically create a reference to a form? Here is
a snippet of what I'm attempting to do, and the problem
I'm experiencing is that my variable is NOT getting
processed as a form even though it is properly building
the name:
'Initialize local variables
Dim txtLoanNumber As String
'Name that this value will build is Forms!frmLoan_1!
txtLoanNumber
txtLoanNumber = "Forms!" & strCurrentFormName_Loans & "!
txtLoanNumber"
sqlGet_Events = "SELECT * " & _
"FROM t_loans " & _
"WHERE (t_loans.[Loan Number])='" & Forms
("txtLoanNumber") & "' ;"
MsgBox sqlGet_Events
If I throw the SELECT statement to the message box above,
it doesn't display - in the WHERE clause - the actual
form variable reference, but rather just the string. Is
there a way of converting that string to a FORM
reference? I've tried all types of alternatives with
nothing.
Thank you very much for any help you can provide.
Regards,
Brent
a snippet of what I'm attempting to do, and the problem
I'm experiencing is that my variable is NOT getting
processed as a form even though it is properly building
the name:
'Initialize local variables
Dim txtLoanNumber As String
'Name that this value will build is Forms!frmLoan_1!
txtLoanNumber
txtLoanNumber = "Forms!" & strCurrentFormName_Loans & "!
txtLoanNumber"
sqlGet_Events = "SELECT * " & _
"FROM t_loans " & _
"WHERE (t_loans.[Loan Number])='" & Forms
("txtLoanNumber") & "' ;"
MsgBox sqlGet_Events
If I throw the SELECT statement to the message box above,
it doesn't display - in the WHERE clause - the actual
form variable reference, but rather just the string. Is
there a way of converting that string to a FORM
reference? I've tried all types of alternatives with
nothing.
Thank you very much for any help you can provide.
Regards,
Brent