Hello. I want to open an existing form from VBA and pass a number to it, so that it is used by some of its controls: combo boxes, lists and associated VBA routines.
--------------
Current code:
Dim strW As String
strW = "[Stk_ID] = " & CStr(Me.Chosen_Stk_ID)
DoCmd.OpenForm "Stk_QAs_Form", acNormal, , strW
--------------
Results:
At the debugger window, strW is "[Stk_ID] = 6"
But when the form Stk_QAs_Form opens, it asks for the value of Stk_ID.
Even if I write a number at the input box, it is reflected in the control Stk_ID.
Any ideas?
--------------
Current code:
Dim strW As String
strW = "[Stk_ID] = " & CStr(Me.Chosen_Stk_ID)
DoCmd.OpenForm "Stk_QAs_Form", acNormal, , strW
--------------
Results:
At the debugger window, strW is "[Stk_ID] = 6"
But when the form Stk_QAs_Form opens, it asks for the value of Stk_ID.
Even if I write a number at the input box, it is reflected in the control Stk_ID.
Any ideas?