Disabling fields with focus

G

Guest

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
 
G

Guest

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
 
G

Guest

Maurice said:
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
 
P

pietlinden

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

You would probably have to setfocus to another control on your form
and then disable whatever you wanted...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top