Focus not moving

I

ishtiaque

Dear

I have a form with some unbound columns/fields. When I save the field values
using a <Save> button fields are saved but the focus does not move to other
controls. But I really need to set the focus on other control ( actually in a
subform linked to the main form) .

Can any of you please help me in this regard.
 
I

ishtiaque

I used me.othercontrol.setfocus at the end of recordset.update method but
still the focus is not moving to othercontrol. Interesting is that when the
code window appears and <F8> is pressed the focus moves.


zishtiaque
 
S

Stuart McCall

ishtiaque said:
Dear

I have a form with some unbound columns/fields. When I save the field
values
using a <Save> button fields are saved but the focus does not move to
other
controls. But I really need to set the focus on other control ( actually
in a
subform linked to the main form) .

Can any of you please help me in this regard.

Try this:

First set focus to the subform control on your main form, something like:

Me.SubformControlName.SetFocus

then set focus to the control on that subform, like:

Me.SubformControlName.Form.ControlName.SetFocus

Replace the obvious with your control names.
 
I

ishtiaque

Thanks a lot for the tip. Actually the focus is not moving to any other
control, even if any control (like a command button) on the main form. Do you
have a solution please.
 

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