Thanks!
If Screen.PreviousControl.TabIndex <> Screen.ActiveControl.TabIndex - 1
Then ...
You'd need to ensure that the tab order is contiguous for all enabled
controls (eg. that disabled controls don't have tab stops set, with a tab
index within the range you want).
I think, though, that if you need to enforce the order in which users move
between controls that there's something wrong with your user interface -
it's not what anyone will expect.
HTH,
Rob
"Tom" <pse...@email.com> wrote in message
news:LFF7g.4$y4...@newsread2.news.pas.earthlink.net...
Dim strWhatever As String
Sub txtControl6_Exit(Cancel As Integer)
If strWhatever = 5 Then
strWhatever = 6
End If
End Sub
Sub txtControl7_Enter()
If strWhatever <> "6" Then
MsgBox "Bad User! Go to the corner.", vbOKOnly
strWhatever = 5
txtControl6.SetFocus
End If
End Sub
You'll need to play with this a little to keep from sticking yourself in a
loop.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
"Tom" <pse...@email.com> wrote in message
news:LFF7g.4$y4...@newsread2.news.pas.earthlink.net...
Chris Mills
Your Access Resource
Get a discount!
http://www.accessresource.somee.com/Specials.html
See why you don't want to go to Access Hell
http://www.accessresource.somee.com/Links.html