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  

Tabbing within Form problem



 
 
Thread Tools Display Modes
  #1  
Old December 11th, 2006, 10:52 PM posted to microsoft.public.access.forms
Mark
external usenet poster
 
Posts: 1
Default Tabbing within Form problem

I use Access 2003. I have a form that contains tabs with fields within each
tab. I also have two fields outside of the tabbed area. How do I make it
[TAB] from the last field outside of the tabs to the first field within the
tabs?


  #2  
Old December 11th, 2006, 10:59 PM posted to microsoft.public.access.forms
Rick Brandt
external usenet poster
 
Posts: 4,354
Default Tabbing within Form problem

Mark wrote:
I use Access 2003. I have a form that contains tabs with fields
within each tab. I also have two fields outside of the tabbed area.
How do I make it [TAB] from the last field outside of the tabs to the
first field within the tabs?


Add another unbound TextBox on your form (not on a TabPage). It needs to
have its Visible property set to True, but you can make it zero height and
width so that the user cannot see it. Put it in the TabOrder after your
second control that is not on the TabControl.

Now, in the GotFocus event of this "dummy" control add a line of code to set
focus to the desired control on the TabControl. When the user tabs out of
the last "real" control they will automatically be taken to the desired
control on the desired TabPage.

This is also can also be used so when you tab out of the last control on the
first TabPage to automatically be taken to the first control on the next
TabPage.

The purpose of the dummy controls is so that the automatic tabbing only
occurs when they tab out of the last real control into a dummy control. If
instead you set focus with the Exit or LostFocus event of your existing
control then even if the user left that control with the mouse (to click on
whatever), the code would force the focus to a control that they did not
want to go to.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


 




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 01:55 PM.


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