B
Bob Howard
Using Access 2000, I have a form with a subform. As the user scrolls
through the table bound to the main part of the form, I will occasionally
want to disable/lock the subform's fields since I don't the user to be able
to touch those fields (controls) for certain records on the main part of the
form. The main part of the form and the subform are related via their table
relationships.
Here's the problem. If the subform's focus happens to be on one of those
controls, I get a "focus" error when I disable/lock the controls. Since I
want to be able to lock every control on the subform, I had no place left to
move the focus.
Since I was unable to find any way to remove the focus entirely but only to
set it somewhere else, I created a "dummy control" on the subform that's
borderless, enabled, visible, and with the same color as the background ---
so the user cannot even tell it's there. I move the focus to that dummy
control.
Is this the only way to do this or I am I missing something?
Bob (@Martureo.Org)
through the table bound to the main part of the form, I will occasionally
want to disable/lock the subform's fields since I don't the user to be able
to touch those fields (controls) for certain records on the main part of the
form. The main part of the form and the subform are related via their table
relationships.
Here's the problem. If the subform's focus happens to be on one of those
controls, I get a "focus" error when I disable/lock the controls. Since I
want to be able to lock every control on the subform, I had no place left to
move the focus.
Since I was unable to find any way to remove the focus entirely but only to
set it somewhere else, I created a "dummy control" on the subform that's
borderless, enabled, visible, and with the same color as the background ---
so the user cannot even tell it's there. I move the focus to that dummy
control.
Is this the only way to do this or I am I missing something?
Bob (@Martureo.Org)