Tab Stops on Tab Controls

Gregc

Board Regular
Joined
Apr 24, 2002
Messages
75
Does anyone know how to adjust the tab stops on a form with tabs so that when you get to the last box on Tab 1 it goes to Tab 2 and through the records on that tab and onto tab 3 from there and so on.

Now what happens is that after tabbing out of the last box on tab 1 it goes to the next record in the table and it won't go to tab 2 unless I click on it with the mouse.


Thanks for the help.

Greg
 

Some videos you may like

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

jobb

Board Regular
Joined
Apr 24, 2003
Messages
78
there is no easy way I know of to do this, but you can work around it..

first, click on the properties of your form and change the "Cycle" to "Current Record". Now you shouldn't encounter the problem of moving to the next record.

next: open the properties for the last text box/field on the first page of your form, and set up a macro or code to run "On Lost Focus". I use macros for this, with just "GoToControl" - the control being the name of the second page you want it to go to. If you don't know the name of the second page, just click on the tab in Design view, and you can see the name on the properties screen under "name". Then repeat the same technique for 2nd page to 3rd, 3rd to 4th, and so on..

Let me know if that works for you.
 

Gregc

Board Regular
Joined
Apr 24, 2002
Messages
75
Thanks for the help Jobb. In general I don't use macros, mainly because I am a little too stupid to understand them when they don't work and two I cut my teeth on Access useing code, so it makes more sense to me. But, I did figure a way to make it work with code so I will post it.

Private Sub txtIssuedBy_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeyTab Then
Screen.ActiveForm!frmShipToInfo.SetFocus
End If
End Sub

I tried using the macro , but like I said me not too smart, so I delved into the help files. Basically set the keydown event on the text box and tell the code where you want to go and off it goes. I had to work a little to get it to focus on a subform.

Thanks again for the pointer Jobb.

Greg
 

Watch MrExcel Video

Forum statistics

Threads
1,122,507
Messages
5,596,544
Members
414,077
Latest member
ammylar5

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top