Focus Problem

C

Chaplain Doug

Access 2002. I have a subform with only three controls
(three fields). I need to disable (.Enabled = False) all
three controls at a particular point, but an error is
generated for one of them because it has the focus. How
may I make it so that none of these controls has the
focus, or how may I disable all the controls without
getting an error? Thanks for the ehlp.
 
A

Allen Browne

Doug, you will have to put something else on the form that can have focus
(e.g. an unbound text box).
 
C

Chaplain Doug

Thanks Alan, except the form is a datasheet and
the "dummy" unbound control now shows up as a column in
the form.

Another question: I have a reference

Forms![Update Student Records]![Update Student Records
subform]![Update Student Records subform2].Form.AllowEdits
= False

This was working just fine and now I am getting an error
message whenever I make the reference. The only change is
that the recordset behind the form is now empty, and
therefore the form will not display any data. But why can
I no longer reference it?
 
A

Allen Browne

Try the ".Form" bit on the first-level subform:

Forms![Update Student Records]![Update Student Records subform].Form![Update
Student Records subform2].Form.AllowEdits = False

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Chaplain Doug said:
Thanks Alan, except the form is a datasheet and
the "dummy" unbound control now shows up as a column in
the form.

Another question: I have a reference

Forms![Update Student Records]![Update Student Records
subform]![Update Student Records subform2].Form.AllowEdits
= False

This was working just fine and now I am getting an error
message whenever I make the reference. The only change is
that the recordset behind the form is now empty, and
therefore the form will not display any data. But why can
I no longer reference it?
-----Original Message-----
Doug, you will have to put something else on the form that can have focus
(e.g. an unbound text box).




.
 

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