Results 1 to 4 of 4
  1. #1
    davidpm is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Posts
    2

    Barcode cursor control

    I have an application where the user can position their cursor in a combo box and use a hand held scanner to read in number from a bar code on a label.

    I have it programmed (I created the label) so the number is entered into the combo box a tab is pressed the cursor moves to the next field which is a command button that accepts the entry and the enter key is pressed.

    This works great.



    What I would like is to have the cursor go back to the combo box automatically so anther label can be scanned.

    I am using 3of9 encoding and shift tab is apparently not part of that specification so I can't put that as part of the label code.

    Is their any way you can think of, perhaps an event connected the command button, that would move the cursor back to the combo box?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    in button click event:

    cboBox.setfocus

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    As ranman256 says, use the SetFocus property to set the focus to the control you want.
    I would use

    Me.YourCtrlName.SetFocus

    Change "YourCtrlName" to your combo box name.

  4. #4
    davidpm is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Posts
    2
    Worked perfectly. Thank you very, very much.
    I had tried setfocus but for some reason I was thinking it had to be in another event.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. barcode control
    By slimjen in forum Forms
    Replies: 2
    Last Post: 11-10-2015, 03:32 PM
  2. Replies: 4
    Last Post: 04-20-2015, 12:36 PM
  3. Replies: 10
    Last Post: 03-29-2012, 10:44 AM
  4. Replies: 2
    Last Post: 02-17-2012, 04:09 AM
  5. Barcode control problem
    By ckleung in forum Database Design
    Replies: 0
    Last Post: 07-26-2011, 10:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums