By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,325 Members | 1,235 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,325 IT Pros & Developers. It's quick & easy.

Mystified by focus that doesn´t show ...

P: n/a
Hi to all,

I have a subform [Child_0] which changes its Sourceobject, using the
following expression:

Forms![Estados Condomino]![Child_0].SourceObject = "Subform Deposito
Mant"

and the focus to the desired control, a textbox calles "TxtMonto"

Forms![Estados Condomino]![Child_0].SetFocus
Forms![Estados Condomino]![Child_0]!TxtMonto.SetFocus

So far so good, no errors, (for once) If I check with the
ActiveControl Property in the immediate window, it displays the
correct Textbox. The only thing is that the focus doesn´t to its
"blinking" on my form. It shows no focus on no control, not on the
parent and not on the Subform. If I then click on no matter where in
the form or the subform, (not on the textbox itself!) the cursor
inmediately shows up, but i do not want to have to do that...

Hope I made it clear and look forward to an answer...
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
TC
Not to answer your question, but: if it really is the subform (not the main
form) that is executing that code, the code should refer to the subform as
Me - not as Forms![Estados Condomino]![Child_0]. Thus:

me![txtMonto].setfocus
^^

This avoids the subform having to know the name of the calling form, and of
the calling form's subform control.

HTH,
TC
"Joost" <am**********@yahoo.com> wrote in message
news:3b*************************@posting.google.co m...
Hi to all,

I have a subform [Child_0] which changes its Sourceobject, using the
following expression:

Forms![Estados Condomino]![Child_0].SourceObject = "Subform Deposito
Mant"

and the focus to the desired control, a textbox calles "TxtMonto"

Forms![Estados Condomino]![Child_0].SetFocus
Forms![Estados Condomino]![Child_0]!TxtMonto.SetFocus

So far so good, no errors, (for once) If I check with the
ActiveControl Property in the immediate window, it displays the
correct Textbox. The only thing is that the focus doesn´t to its
"blinking" on my form. It shows no focus on no control, not on the
parent and not on the Subform. If I then click on no matter where in
the form or the subform, (not on the textbox itself!) the cursor
inmediately shows up, but i do not want to have to do that...

Hope I made it clear and look forward to an answer...

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.