Solved

Finding the focus

Posted on 2006-10-25
2
227 Views
Last Modified: 2010-04-23
Hello,

I am trying to write some code that will evaluate where the focus is currently with a true/false.  something like this.....

If textbox1.focus = true then
end if

The above will not work for me though, any ideas?

Thanks!

-Navicerts
0
Comment
Question by:Navicerts
2 Comments
 
LVL 17

Accepted Solution

by:
ZeonFlash earned 500 total points
Comment Utility
Try using the form's ActiveControl property:

If textbox1 Is Me.ActiveControl Then
End If
0
 
LVL 7

Author Comment

by:Navicerts
Comment Utility
That worked great, thank you!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now