Combo Box Macro????

B

Brad

All,

I have created a form with a combo box of store numbers. When I select a
list item (store number) from the combo box I click a button to print that
stores report from a multi store report.

I would like to create a macro (and activate it with a button click) that
would select the next "list" item on the combo box list, so it would not be
necessary to click the drop down arrow and choose the next list item.

I've tried gotocontrol (comboO), followed by every conceivable function
nextrecord, etc.. with no luck. I would be grateful for your suggestions.

Thank you in advance,

Brad
 
K

Ken Snell [MVP]

Use the SetValue macro action to change the value of the combo box:

Action: SetValue
Control Name: [ComboBoxName].Value
Expression: [ComboBoxName].ItemData([ComboBoxName].ListIndex + 1)

Note that this will show a "blank" display if you're at the bottom of the
list when you click the button, but a second click will then cycle through
the list again.
 
K

Ken Snell [MVP]

In addition to the suggestion that I just posted, I have designed a "spin
arrow" control for a combo box, but haven't actually posted it on internet
for others to try out. It involves two "buttons" on the side of a combo box
that allow you to go up and down the list simply by clicking the appropriate
button. If you're interested in this, post back and we'll work out a way to
get you a sample database that shows how to set this up.
 
B

Brad

Ken,

Thank you for the setvalue information, it worked perfectly. I would be very
interested in the "spin arrow" since I use the combo box to select stores to
send reports to weekly. I currently send several reports a week (using
winfax pro) to 50+ stores.

Please let me know how I could retrieve a sample.

Thanks,

Brad
 
K

Ken Snell [MVP]

OK - Let me put together some stuff and then I'll post back on how you can
download it.
 
B

Brad

Ken,

I've downloaded and installed on one of my forms. I will test it over the
next week and post back. It works great.

Thank you for your time and effort.
Brad
 
S

Stephen Lebans

New Web site Ken?
(Trying to get the free trip to Disney?)
:)

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
K

Ken Snell [MVP]

Stephen Lebans said:
New Web site Ken?
(Trying to get the free trip to Disney?)
:)

Well, not exactly... I started putting it together months ago...then the
need to feed my family got in the way of working on it.... probably will
build it one item at a time as people look for things.... < g >
 

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