G
Guest
I have a main form named "Manage Accounts". Form "MC MAN" is a subform on
"Manage Accounts". "MC MAN" has 2 textbox controls. The DefaultView is
Datasheet. Form "MC AN" is a subform on "MC MAN". It has 3 textbox
controls, actno, actname and acttype. The DefaultView is Continuous Form.
MC MAN and MC AN are linked. The SubdatasheetExpanded property is set to
false.
I want to disable the actno control when my resetform code runs. This code
runs when the form loads or the escape key is pressed. I tried running
resetform with code:
Forms![Manage Accounts].Form![MC MAN].Form![MC AN].Form![actno].Enabled =
False
I got the runtime error 'you can't disable a control while it has the
focus'. So I tried to move the focus with:
Forms![Manage Accounts].Form![MC MAN].Form![MC AN].Form![actname].SetFocus
and got the error 'you entered an expression that is an invalid reference to
the propertry Form/Report'.
I want to enable actno when the User clicks a command button. I tried:
Forms![Manage Accounts].Form![MC MAN].Form![MC AN].Form![actno].Enabled =
False
This gives the same invalid reference error.
I tried several other things that seemed to work at first but then got the
same error messages.
Thanks for taking the time to read this. I am interested in your thoughts.
"Manage Accounts". "MC MAN" has 2 textbox controls. The DefaultView is
Datasheet. Form "MC AN" is a subform on "MC MAN". It has 3 textbox
controls, actno, actname and acttype. The DefaultView is Continuous Form.
MC MAN and MC AN are linked. The SubdatasheetExpanded property is set to
false.
I want to disable the actno control when my resetform code runs. This code
runs when the form loads or the escape key is pressed. I tried running
resetform with code:
Forms![Manage Accounts].Form![MC MAN].Form![MC AN].Form![actno].Enabled =
False
I got the runtime error 'you can't disable a control while it has the
focus'. So I tried to move the focus with:
Forms![Manage Accounts].Form![MC MAN].Form![MC AN].Form![actname].SetFocus
and got the error 'you entered an expression that is an invalid reference to
the propertry Form/Report'.
I want to enable actno when the User clicks a command button. I tried:
Forms![Manage Accounts].Form![MC MAN].Form![MC AN].Form![actno].Enabled =
False
This gives the same invalid reference error.
I tried several other things that seemed to work at first but then got the
same error messages.
Thanks for taking the time to read this. I am interested in your thoughts.