assuming your texboxes are named txtVendor and txtItem
1. set the form's key preview to True.
2. in the form's key down event. add something like:
If Me.ActiveContro l.Name = txtVendor Then
' Code to execute for the On Vendor Situation
ElseIf Me.ActiveContro l.Name = txtItem Then
' Code to Execute for the On Item textbox situation
Else
' Probably wont need an Else in this construct.
End if
You just need to add ElseIf construct with its' corresponding code for any
other control you might want to add a search feature to.
--
Stéphane Richard
Senior Software and Technology Supervisor
http://www.totalweb-inc.com
For all your hosting and related needs
"Lizard King" <wi*******@star media.com> wrote in message
news:df******** *************** ***@posting.goo gle.com...
...which control has focus at a given moment?
This is what I want. I have two textboxes in a form: one for vendor
and one for items. Now, if am at the vendor field and I press [F3]
the vendor search form should appear but If I am at the item field It
should show the item search form.
All comments will be appreciated.
Thank you.
Lizard King.