charsiufan
New member
- Local time
- Tomorrow, 05:14
- Joined
- Jun 26, 2021
- Messages
- 3
I have a form with VBA on the Open event. It is setting the value of a combo box control on an embedded subform:
Me.subfrmShoppingListItem.Form.cboShoppingList = Nz(GetDefaultValue(5))
This works fine whenever I open the form from scratch.
HOWEVER if I place the main form in Design View and then move to Form View I get the 2455 error:
'You entered an expression that has an invalid reference to the property Form/Report.
If I interrogate the value of the control in the Immediate window (as below) at this point it again has the 2455 error:
Immediate Window:
?Me.subfrmShoppingListItem.Form.cboShoppingList
Is it a corrupt form?
Me.subfrmShoppingListItem.Form.cboShoppingList = Nz(GetDefaultValue(5))
This works fine whenever I open the form from scratch.
HOWEVER if I place the main form in Design View and then move to Form View I get the 2455 error:
'You entered an expression that has an invalid reference to the property Form/Report.
If I interrogate the value of the control in the Immediate window (as below) at this point it again has the 2455 error:
Immediate Window:
?Me.subfrmShoppingListItem.Form.cboShoppingList
Is it a corrupt form?