Hi,
I am trying to pass a value from form A to form B via openargs.
This is in response to a "notinlist" event on form A. I am opening form B with the openargs set to the "NewData" parameter generated by the notinlist event on form A.
Then, in the OnOpen event for form B, I set a field's value equal to the openarg.
The weird thing is, if I put this exact same line of code behind a button-click, and then click the button after the form is open, it works fine. Why won't this work in the OnOpen event???
I know I've used OpenArgs like this many times before (Unless, of course, I have finally really lost my mind.)
BTW, Form B is being opened in data entry mode, as a dialog box.
Using Access 2002.
Suggestions appreciated.
I am trying to pass a value from form A to form B via openargs.
This is in response to a "notinlist" event on form A. I am opening form B with the openargs set to the "NewData" parameter generated by the notinlist event on form A.
Then, in the OnOpen event for form B, I set a field's value equal to the openarg.
It's here that I get the runtime error 2448, "You can't assign a value...."Me.ctlCell.Value = Me.OpenArgs
The weird thing is, if I put this exact same line of code behind a button-click, and then click the button after the form is open, it works fine. Why won't this work in the OnOpen event???
I know I've used OpenArgs like this many times before (Unless, of course, I have finally really lost my mind.)
BTW, Form B is being opened in data entry mode, as a dialog box.
Using Access 2002.
Suggestions appreciated.