ComboBox code to next record in dropdown list

  • Thread starter hotrod1952 via AccessMonster.com
  • Start date
H

hotrod1952 via AccessMonster.com

Access97 Have query which returns 15 records (Sort15). Form "Srt15" Based on
query. Has continuous subform "Srt15Sub" (also based on query Sort15). I can
View the 15 records on my form.
The Form also has a combobox (CBO23)based on the query and 15 textboxes (one
for each record)the ( CBO23) allows me to choose which of the 15 records in
the combo and opens a second form (Labor)and displays other information
specific to that record. Then I close the Labor form and focus is set to the
first of 15 textboxes where I can enter a comment for that record. After I
enter the comment I have the form return focus to the CBO23 and have it drop
down. So far all this works like clockwork. What I would like to do is
somehow have the textbox automatically highlight or move focus to the next
record in the dropdown list when focus moves back to CBO23. It seems to me
this should be easy but I am having a brainfart.
 
N

n00b

I think you need something like this:

CBO23 = CBO23.ItemData(CBO23.ListIndex + 1)

near the place in your code where you set focus to CBO23.
 
H

hotrod1952 via AccessMonster.com

I think you hit it right on the head. Thanks that work great!
n00b said:
I think you need something like this:

CBO23 = CBO23.ItemData(CBO23.ListIndex + 1)

near the place in your code where you set focus to CBO23.

Access97 Have query which returns 15 records (Sort15).  Form "Srt15" Based on
query. Has continuous subform "Srt15Sub" (also based on query Sort15). I can
[quoted text clipped - 12 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top