Mouse Wheel / Combo Box / Change Records (1 Viewer)

sznsx

Registered User.
Local time
Today, 05:19
Joined
Jul 25, 2004
Messages
20
I have a combo box that is used to select records from a table. This is ment to be the primary way a user is to move from one record to another. However, I also like the ease of using the mouse wheel to scroll through records quickly.

Problem: When the mouse wheel is used to scroll through the records, the value in the combo box stays the same. I tried to put the code "combo_box = [FieldValue]" in the onCurrent event for the form, but the onCurrent event seems to run BEFORE the record is changed. For example, if the current record is A and I scroll to record B, it sets the value of combo_box in record B to A. If you then scroll to record C, the value of combo_box in record C is then set to B.

Is there an event that runs AFTER the record has changed, or right at the beginning momments when a record is first loaded. I tried OnCurrent, OnDirty, AfterUpdate, BeforeUpdate, OnLoad....
 
Last edited:

sznsx

Registered User.
Local time
Today, 05:19
Joined
Jul 25, 2004
Messages
20
nothing?

Anyone have any idea, or is my question to unclear?
 

sznsx

Registered User.
Local time
Today, 05:19
Joined
Jul 25, 2004
Messages
20
Anyone !

Anyone !!?
 

adam_fleck

Registered User.
Local time
Today, 11:19
Joined
Apr 30, 2004
Messages
85
What you've done should work I think

Sounds like what you've set up should work. Maybe the problem lies with [FieldValue] rather than with onCurrent, which runs, as far as I know, directly after the form first arrives at what is now going to be the current record.

If, for some reason, OnCurrent was getting hold of the old value of this, then that might explain things, though I can't think of any obvious reason why it might be doing that.

Have a look at the attached 2000 db-let, and see if the form behaves correctly.
 

Attachments

  • combo_scroll.zip
    12.5 KB · Views: 235

ghudson

Registered User.
Local time
Today, 05:19
Joined
Jun 8, 2002
Messages
6,195
Hopefully your combo box is not bound to the record source.

I too have used combo boxes to allow a user to select and jump to a record. I have always cleared the value in the combo box after the user has jumped to the selected record. Using the AfterUpdate event of however you fire the event to jump to the selected record. It gives a "clean" visual for the current record since the user will already know which record they are on.

There has been an occasion for where I wanted the value in the combo box to be visible. To serve my purpose, I create another combo box and resize the combo box so that only the drop down arrow is visible. When the user clicks the drop down the combo box expands to display the list of values. I place this combo box beside the other combo box or text field.

Hopefully this will have given you another idea on how to accomplish what you want.
 

Users who are viewing this thread

Top Bottom