Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to PreviousControl    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Question
Jerry Fowler 
       
2 years ago
So they have ActiveControl and, PreviousControl, but I looked and couldn't find the NextControl or FutureControl???

Sometimes when I really think hard about stuff like this my head hurts.


Sorry just had to ask, lol
Adam Schwanz  @Reply  
           
2 years ago
Not sure if this is Satire/Sarcasm or not. If so, it's a good one :P.

If not, there can be no future or next control until they finish the mind reading software to know what we want to do next :P.
Jerry Fowler OP  @Reply  
       
2 years ago
Yes, although sometimes my mind works in mysterious ways :)
Gary Becker  @Reply  
     
2 years ago
So, couldn't the NextControl be PreviousControl.taborder + 1 ?? Just asking.
Richard Rost  @Reply  
          
2 years ago
I was just going to say that, Gary. It's definitely possible to figure out what the next control in the Tab Order would be. It's not that simple, but you could iterate through them to figure it out. Hmm... video maybe...??? But aside from being trivial would this actually help anyone?
Richard Rost  @Reply  
          
2 years ago
Here's what GPT gives me. I haven't tested it yet, but it's the same algorithm I would have followed:

Dim frm As Form
Dim ctl As Control
Dim nextCtl As Control
Dim i As Integer
Dim found As Boolean

Set frm = Screen.ActiveForm
Set ctl = Screen.ActiveControl

found = False

' Loop through the Controls collection in tab order
For i = 0 To frm.Controls.Count - 1
    If frm.Controls(i).TabIndex = ctl.TabIndex + 1 Then
        Set nextCtl = frm.Controls(i)
        found = True
        Exit For
    End If
Next i

' Handle the case where the next control is not found
If Not found Then
    MsgBox "Next control not found. It might be the last control in the tab order."
Else
    MsgBox "The next control in the tab order is: " & nextCtl.Name
End If

Adam Schwanz  @Reply  
           
2 years ago
That's not next control that's next tab order :P. My next control was going to be back to the main menu, not pushing tab. Mind reading technology isn't working lol.

In all seriousness, what would an application be of using that where just .setfocus wouldn't accomplish it, other than just because you can? I assume To be able to change a value and continue moving forward into the future fields?

Maybe have Yes/No buttons in the middle of the screen and go down a list of checkboxes marking true or false? Something like this where you would just pick true or false and it would move and mark the next sequential checkbox? Although in my example you might as well just delete the false button, the true button is the only one needed :).

Adam Schwanz  @Reply  
           
2 years ago

Kevin Robertson  @Reply  
           
2 years ago
Adam So how do you really feel about TempVars?
Adam Schwanz  @Reply  
           
2 years ago
There's Tempvars, then recordsets, then way further down, everything else ;).
Richard Rost  @Reply  
          
2 years ago
You could also just SendKeys a TAB. Love me some SendKeys. :)

This thread is now CLOSED. If you wish to comment, start a NEW discussion in PreviousControl.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/29/2026 10:13:47 PM. PLT: 1s