Keeping Focus

G

Gary Dolliver

Hi all,
I am looking to have an entry field where numbers will be scanned in via a
barcode scanner, and when the number is scanned into the field, an onUpdate
event will launch, updating a table. Is there a way this field can retain
the focus and not have it move to another field? That way I can keep
scanning in numbers in the one entry field? I have tried using the
DoCmd.GoToControl and pointing back to the field, but it is not working.
Help is appreciated, thanks!
-gary
 
R

ruralguy via AccessMonster.com

Put a TextBox next in the tab order and set the OnEnter event to a SetFocus
to the previous control. Then set the Width and Height to 0" so it is
essentially invisible but can still get the focus. Name it txtJumpBack or
something like that so you can find it. You will be able to use the mouse to
go to another control on the form but tabbing out of the control will just
jump back to it.
 
G

Gary Dolliver

Thank you so much! Worked beautifully!
-gary

ruralguy via AccessMonster.com said:
Put a TextBox next in the tab order and set the OnEnter event to a SetFocus
to the previous control. Then set the Width and Height to 0" so it is
essentially invisible but can still get the focus. Name it txtJumpBack or
something like that so you can find it. You will be able to use the mouse to
go to another control on the form but tabbing out of the control will just
jump back to it.
 
R

ruralguy via AccessMonster.com

Glad I could help. Thanks for posting back with your success.

Gary said:
Thank you so much! Worked beautifully!
-gary
Put a TextBox next in the tab order and set the OnEnter event to a SetFocus
to the previous control. Then set the Width and Height to 0" so it is
[quoted text clipped - 12 lines]
 
Top