A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Redirect Control Focus



 
 
Thread Tools Display Modes
  #1  
Old April 22nd, 2008, 03:28 PM posted to microsoft.public.access.forms
=Ray=
external usenet poster
 
Posts: 31
Default Redirect Control Focus

I have a form with a subform, and if you tab through the subform's fields,
after the last field, it tabs back to the first field on a new record. But
instead of this, I want it to send the focus to a different control (on the
main form) when you tab out of that field.

The problem is I don't see any method to do this. I'm thinking there should
be a
ControlA.Sendfocus ControlB
method or something that I can put in the ControlA_LostFocus Procedure.

Can someone tell me how I can accomplish this?
Thanks,
Ray
  #2  
Old April 22nd, 2008, 07:20 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default Redirect Control Focus

Use the LostFocus event of the last control on the subform

Me.Parent.ControlName.SetFocus
--
Dave Hargis, Microsoft Access MVP


"=Ray=" wrote:

I have a form with a subform, and if you tab through the subform's fields,
after the last field, it tabs back to the first field on a new record. But
instead of this, I want it to send the focus to a different control (on the
main form) when you tab out of that field.

The problem is I don't see any method to do this. I'm thinking there should
be a
ControlA.Sendfocus ControlB
method or something that I can put in the ControlA_LostFocus Procedure.

Can someone tell me how I can accomplish this?
Thanks,
Ray

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:57 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.