Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does this control have the focus? 1

Status
Not open for further replies.

annie52

Technical User
Mar 13, 2009
164
US
I want to force the user to enter something into the XrefGroupNum field on the subform before allowing them to enter data anywhere else on the subform. I used the subform's Dirty event to test for null in the XrefGroupNum field. This is fine if the user attempts to enter data in any other field. But, I cannot figure out what to do if the user is trying to enter data in that field as I want them to. In other words (I guess), I can't figure out how to tell if the XrefGroupNum field has the focus when the subform is Dirty.
 
how to tell if the XrefGroupNum field has the focus
Typed, untested:
If Screen.ActiveControl.Name = "XrefGroupNum" Then

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi PHV. The snippet might have been untested, but it's perfect! Thanks a million!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top