I have a form with several subforms on it. When the main form's record is in
a certain state, I disable the various fields on the form and subform.
However, since the subforms get focus as well as the main form, when I go to
disable them I get an error saying you can't disable the field with focus.
I tried creating a hidden field, but for some reason I couldn't SetFocus to
it.
Is there a "best practice" solution to this?
Maury
Maurice - 16 Jul 2007 17:02 GMT
Don't you have a button on your form? That's where I put the focus in a
situation like this. If you do want to use a hidden control place it under
the button or just place it in the form and set the properties to the color
of the form.
hth

Signature
Maurice Ausum
> I have a form with several subforms on it. When the main form's record is in
> a certain state, I disable the various fields on the form and subform.
[quoted text clipped - 8 lines]
>
> Maury
Maury Markowitz - 16 Jul 2007 17:22 GMT
> Don't you have a button on your form?
Actually, no, the subforms are display only. But I'll add a hidden button
instead, that seems easy enough!
Maury
goode2fox - 26 Sep 2007 16:18 GMT
yup you have the to do that some computers do not work
> > Don't you have a button on your form?
>
> Actually, no, the subforms are display only. But I'll add a hidden button
> instead, that seems easy enough!
>
> Maury
pietlinden@hotmail.com - 16 Jul 2007 17:44 GMT
On Jul 16, 9:44 am, Maury Markowitz
<MauryMarkow...@discussions.microsoft.com> wrote:
> I have a form with several subforms on it. When the main form's record is in
> a certain state, I disable the various fields on the form and subform.
[quoted text clipped - 8 lines]
>
> Maury
You would probably have to setfocus to another control on your form
and then disable whatever you wanted...