Using MS Access/Moving next in Listbox



I know there must be a way to do this, but not sure how.

When I click a Listbox item, the focus moves to a qty field.  Once a quantity is entered, the focus moves back to the same item in the listbox.   Is there a way to have the focus move to the next item in the listbox, rather than having to click it with the mouse?

thanks in anticipation

ANSWER: I'm curious as to why you want to do this. Doesn't make sense to me.

But I think you can do it using the Index property of the listbox. By incrementing the index property, you may be able to have the cursor on the next item.

I've never done it so I'm not 100% positive.

If you explain the process I may be able to suggest an alternative.

Hope this helps,
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

---------- FOLLOW-UP ----------

QUESTION: Thanks Scott,

It's a data entry speed thing really.

ListBox contains range of stock sold in a bar, and at the end of each day, the publican has to enter beer/spirits/etc sales by quantity to reduce his stock on hand, which has flow on effects for ordering replacement stocks, et cetera.

At present, if the publican clicks Budweiser Draught, the focus moves to the qty sold field.   Once a figure is entered, it would be nice if the focus moved back to the ListBox, and move to the next item in that listbox, for instance, Coors Lite. Then the publican could simply enter a numeral, and move on to the next, and so on...

Time-saver especially if the publican is using a laptop...

Does that explain it more?


Is the form unbound? Because, if it isn't, all he would be doing is overriding the same record.

The way I would do this is to prepopulate the table with all the items in the listbox, then use a continuous form and the user can just enter quantities down the column. The date would default. When done use a Save button to delete all records with a zero quantity.

Hope this helps,
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Using MS Access

All Answers

Answers by Expert:

Ask Experts




I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.


I've been designing databases for over 25 years working with dBase, FoxPro, Approach and Access.

Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

Brooklyn College BA

©2016 All rights reserved.