Using mouse to scroll down a combo list

E

efandango

Is there any way I can have my mouse wheel scoll up and down the actual
contents of a list on of a combo box.

I don't mean the standard 'scroll the list' where the list just moves up and
down but stays fixed on the initial selection. Instead I want the mouse to
scroll through the different field contents highlighting as it goes until I
find the field record that I want to use. Then just leave the box, making the
last selected (highlighted) field content my chosen record. I have a finite
list of 16 records in each combo box, and at the moment, have the 'List Rows'
property set to 16.
 
E

efandango

Arvin,

Thanks for the reply. Yes. everything you said, I understand (already knew).
But what I want is some way of having the 'highlight bar' move up and down by
just using the mouse wheel and not having to move the mouse. There is a very
good reason for this. I have numerous list of 16 records per combo box, and
they all eventually have to be picked (it's a qiz thing). and after a while
it gets 'tiring' on the eyes moving the mouse around, wheras it would be
better if the hightlight bar just moved up or down.

I know this is not the 'standard' way combo boxes are supposed to work, but
it suits this application better if I can get the mouse wheel to do the work.
 
S

strive4peace

Hi Eric,

alt-{down arrow} will drop the list
press {down arrow} to move to the next choice
(once you press {down arrow}, you can press {page up} and {page down})
then {tab} to exit the control and move to the next...

"16 records per combo box"

if you have room on the screen, you can make ListRows a higher number

Warm Regards,
Crystal

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
:) have an awesome day :)
*
 
E

efandango

Thanks Crsytal,

I was aware of these features of the combo box. It is mainy this messing
around with arrow keys to go up and down the list of entries that has led me
to want to do the same woth the mouse wheel. The 16 records per combo are
finite; so no need to increase ListRows. I just want the user to be able to
not have to leave the mouse/wheel. The combo box appears on every 'page#' of
the main records. It's a quiz answer list, and all 16 have to be answered,
hence the desire to just have the mouse wheel scroll the 'highlight' bar up
and down. (and it would look as neat as it would be to actually use.)

regards

Eric
 
S

strive4peace

Hi Eric,

rather than making the user choose each question, add the questions for
them.

I will assume you have a table where the questions are defined

Questions
- QID, autonumber
- Question, text
etc

and tables with test info and where you record answers

Tests
- TestID, autonumber
- PersonID, long -- FK to identify who is taking the test
- TestDate, date

Answers
- AID, autonumber
- TestID, long -- FK to tests
- QID, long -- FK to Answers

in the Answers table, make a multi-filed unique index on the combination of
TestID
QID
(instructions on how to do this are in Access Basics) -- this is so, if
you accidentally append questions twice, you do not end up with duplicates

then, when you make a new record for Tests, on the form AfterUpdate
event, append all the questions to the answers table and requery the subform

'~~~~~~~~~
dim strSQL as string
strSQL = "INSERT INTO Answers (TestID, QID) " _
& " SELECT QID, " & me.testid _
& " FROM Questions;"
currentdb.execute strSQL
currentdb.tabledefs.refresh
DoEvents

me.subform_controlname.requery
'~~~~~~~~~~~~~~

hopefully, you can see the logic of this. If not, post back with
questions <smile>


Warm Regards,
Crystal

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
:) have an awesome day :)
*
 
E

efandango

Crystal,

I appreciate your advice on the structure of a question and answer setup;
but I already have all that working just fine. I just wanted to improve the
interface/ergonomics aspect of the user experience. In saying that I already
have a complete setup working well; there is always somethine one can learn.
In time I will look at your structure setup more closely and see if I can use
it to improve my working solution. In the meantime; is there a definitive
answer as to whether I can have my mousewheel scroll the highlight bar up and
down, rather than have the laist itself move up and down (which incidently,
it doesn't due to the max 16 items which I can easily accomodate on my form)

regards

Eric
 
S

strive4peace

Hi Eric,

"advice on the structure"

you know me too well ;)

actually, this wasn't about structure -- just used the structure example
to show you how to automatically create the answer records and eliminate
the need for the users to do it ;)


Warm Regards,
Crystal

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
:) have an awesome day :)
*
 
E

efandango

Hi Crystal,

LOL... :)

after our exchanges on my 'How can I Automate a complex update process
involving 3-4 tables?.' thread; I feel I know you quite well. Nice to know
you are back in the groove after your recent holiday/trip. I will come back
to you on the outstanding question above if I may, just as soon as I have
recharged my batteries and tightened things up with the database.

Meanwhile...

is there a definitive answer as to whether I can have my mousewheel scroll
the highlight bar up and down, rather than have the laist itself move up and
down (which incidently, it doesn't due to the max 16 items which I can easily
accomodate on my form) can it be done with some kind of control code? or does
a non-reply to this question imply that the answer is a resounding, No?...


best regards

Eric
 
S

strive4peace

Hi Eric,

<smile>

I did not respond to the 'mousewheel' part of your question because I
have no experience with it. You might want to check Stephen Lebans site
-- here is a link for something on the mousewheel -- not what you are
asking but it may give you some ideas:

Mouse Wheel On/Off, by Stephan Lebans
http://www.lebans.com/mousewheelonoff.htm

another good site to search (I just did and it turned up several links
for 'mouse wheel') is:

http://MVPs.org/



Warm Regards,
Crystal

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
:) have an awesome day :)
*
 
E

efandango

Stepehen,

That's great News!

Thanks so much for your concise reply. I will now go and try your code.

regards

Eric
 
E

efandango

Stephen,

I noticed that your code seems to just refer to ListBox's; can it work with
ComboBox lists as well?

regards

Eric
 
E

efandango

Hello Stepehen,

I have looked at your sample mdb, but cannot see the listbox working the way
I was hoping that it would. eg: move the mouse wheel and the list item
highlight bar moves through the list. You also mentioned the MouseWheel
event, but I cannot see any reference to it or how to utilise it in the help
files. I am Using MS Access 2007.

Your samples all make reference to using command buttons; I am guessing that
I would have to switch the command buttons reference to the mousewheel event
options. yes?. Also, my combo box is using a table/query for its RowSource,
albeit with a permanatly fixed no of (16) records each time.

regards

Eric
 

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