Listbox value (1 Viewer)

kirkm

Registered User.
Local time
Tomorrow, 10:30
Joined
Oct 30, 2008
Messages
1,257
Ah, that would be an advantage of using an ActiveX control over the original Listbox design then. Thanks!
Yes, there was no need to click 100 times, just hold it down. But am I using an activeX control? It was just the Listbox tool from Access's Create menu.
 

kirkm

Registered User.
Local time
Tomorrow, 10:30
Joined
Oct 30, 2008
Messages
1,257
However, still would think a combobox would be the best UI since it sounds like it is not multiselect.
Right I'll try it and see. I had changed height to show 3 items and that made it obvious one should be clicked. This also turned the "arrows" into a scrollbar.
The listbox height showing only one item, then changing them (yes like a spinner) but still having to click was not good.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 14:30
Joined
Oct 29, 2018
Messages
21,358
As far as I can tell, none. But you're only showing one item... then that's the one you want.
Hi. I understand you might think that would make sense, but a Listbox doesn't work like that. Just because you made the height only tall enough to display the item you want, Access has no idea that's what you're trying to do.

Before the spinner suggestion, I was thinking if maybe it would be possible to capture the clicking of the arrow, so you can use code to accomplish what you want.

However, even if that was possible, I also wondered why ask the user to click 100 times to select 100?

Edit: I see, holding down the arrow scrolls the selections.
 

Isaac

Lifelong Learner
Local time
Today, 14:30
Joined
Mar 14, 2017
Messages
8,738
This has been a very interesting thread. It seems the major misconception @kirkm was the assumption that if you made your Listbox's height really really tiny, to where only a single line showed (something I have never heard of anyone doing before), then you thought that item that 'showed' would be the Listbox's value. That makes no sense at all, because Listboxes and Comboboxes exist for the purpose of someone selecting something. That's all. It wouldn't make any sense for Microsoft to make the Value of the control be whatever line is Showing, because what about the other (everyone) in the development world who makes a listbox of a height that shows multiple items at a time? Then what would the Value supposed to be? Everything?

Use a listbox or cbo when you want to give the user a chance to select something. It is not to watch lines flash on the screen as scrollbars are used.

If the preset values are 1-100, why use any of the mentioned controls? Seems like a textbox where they could type 3 numbers on the keypad would probably be the easiest solution. Why any of the clicking or scrolling or holding down if someone probably would rather type "55" on the keypad and be done. It's starting to remind me of this article
 

kirkm

Registered User.
Local time
Tomorrow, 10:30
Joined
Oct 30, 2008
Messages
1,257
When designing the form I had a textbox, a label and listbox in a row, showing e.g "1944" to "1955". The 1944 is passed in OpenArgs and the listbox held years from that to 2000 (max). I simply made the listbox the same height as text box for aesthetics, then noticed the scrollbars worked like spinners changing the values while you held the mouse down. I though that was pretty cool, and achieved the desired result. But then of course I couldn't read the value. I didn't think Access has no idea, as it allowed that condition to exist.
The 1 to 100 was a copy of that and just the "first try". I didn't intend anyone to click 100 times!
So now all those 3 controls are combo boxes and it's much better. Providing the "current" value can be read. (Surely?). And the user can type a number or pick from the list. I think I can limit their input to only items in the list to.
Anyway I've enjoyed developing this and getting everyone's input. Cheers :)
 

theDBguy

I’m here to help
Staff member
Local time
Today, 14:30
Joined
Oct 29, 2018
Messages
21,358
When designing the form I had a textbox, a label and listbox in a row, showing e.g "1944" to "1955". The 1944 is passed in OpenArgs and the listbox held years from that to 2000 (max). I simply made the listbox the same height as text box for aesthetics, then noticed the scrollbars worked like spinners changing the values while you held the mouse down. I though that was pretty cool, and achieved the desired result. But then of course I couldn't read the value. I didn't think Access has no idea, as it allowed that condition to exist.
The 1 to 100 was a copy of that and just the "first try". I didn't intend anyone to click 100 times!
So now all those 3 controls are combo boxes and it's much better. Providing the "current" value can be read. (Surely?). And the user can type a number or pick from the list. I think I can limit their input to only items in the list to.
Anyway I've enjoyed developing this and getting everyone's input. Cheers :)
Hi. Glad to hear you're making good progress. Each control has a specific purpose and function. The trick is using the one that fits your needs.

Good luck with your project.
 

Users who are viewing this thread

Top Bottom