How can I achieve this? I've got a subform with a specific combo box in it. Depending on a selection in the parent/main form, I would like to update the combo box according to that value.
I populate the combo box's row source is as follow in the OnCurrent event:
Not sure using a global variable is the way to go but I've declared a ReturnType variable as "Public ReturnType as Integer" on the parent form and I've assigned it a value.
How can I force my code to pick up the global variable's value? And is it at all possible to pass a value between forms and subforms?
I've also tried using [Forms]![frmReturn_Header]![cboReturnType] to point to the specific field:
without any luck.
I populate the combo box's row source is as follow in the OnCurrent event:
Code:
Me.cboReturnLineType.RowSource =
"SELECT ODS.Return_Line_Type.Return_Line_Type_ID, ODS.Return_Line_Type.Return_Line_Type_Name
FROM ODS.Return_Line_Type
WHERE Return_Type_ID = " & ReturnType & "
ORDER BY Return_Line_Type_Name"
How can I force my code to pick up the global variable's value? And is it at all possible to pass a value between forms and subforms?
I've also tried using [Forms]![frmReturn_Header]![cboReturnType] to point to the specific field:
Code:
Me.cboReturnLineType.RowSource =
"SELECT ODS.Return_Line_Type.Return_Line_Type_ID, ODS.Return_Line_Type.Return_Line_Type_Name
FROM ODS.Return_Line_Type
WHERE Return_Type_ID =
" & [Forms]![frmReturn_Header]![cboReturnType] & "
ORDER BY Return_Line_Type_Name"