[AccessD] A2K - Preventing the tab getting the focus

Brett Barabash BBarabash at TappeConstruction.com
Tue Feb 18 09:31:00 CST 2003


Be EXTREMELY careful when using Exit and LostFocus events.  For example,
what if the user is on the last field of the form, and decides to click on a
textbox in the middle of it?  The code you just posted will shoot them back
to the first one!


-----Original Message-----
From: Heenan, Lambert [mailto:Lambert.Heenan at aig.com]
Sent: Tuesday, February 18, 2003 9:22 AM
To: 'accessd at databaseadvisors.com'
Subject: RE: [AccessD] A2K - Preventing the tab getting the focus


You'd think you could just set the tab control's Tab Stop property to "No",
but when you do so you also disable cyclic tabbing all together. The
workaround...

In the last control's LostFocus event...

	FirstControl.SetFocus

No dummy control needed, not quite so kludgy. 

Lambert


> -----Original Message-----
> From:	John W. Colby [SMTP:jcolby at colbyconsulting.com]
> Sent:	Tuesday, February 18, 2003 10:09 AM
> To:	AccessD
> Subject:	[AccessD] A2K - Preventing the tab getting the focus
> 
> Is there any way to prevent the tab from getting the focus.  When the user
> tabs out of the last control in the tab order, the focus goes to the tab
> page itself (up in the tab doodad at the top) then the next tab puts it
> back
> down into the page, first tab control.  In the olden days we would put a
> dummy control behind the last control in the tab order and when that got
> the
> focus, it would place the focus on the first object in the tab order.  So
> kludgy.  Is there any built in method now?
> 
> John W. Colby
> Colby Consulting
> www.ColbyConsulting.com
> 
> 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list