471,066 Members | 1,183 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

Mystified by focus that doesn´t show ...

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
1 1394
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.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.