473,659 Members | 2,965 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Scroll To Top of List Box By Code...

I have an extended multi select list box on one of my forms. As an
example the list box would contain a list of vendors including a
'default' vendor called "Unknown". As an FYI, the query that drives
the list box is written such that the Unknown vendor is listed first
followed by all 'real' vendors alphabetically. The list box is
formatted so that six vendors out of approximately seventy display at
one time. I want to keep that size. Is theer a way to code a button
to scroll the list box to the first/last item in the list rather than
just mark a given record as selected?

May 29 '07 #1
1 18585
To scroll to top of list:

Dim lst As ListBox
Set lst = Me!List0

lst.ListIndex = 0

To scroll to bottom:

lst.ListIndex = lst.ListCount - 1

"DavidB" <je***@yahoo.co mwrote in message
news:11******** *************@q 69g2000hsb.goog legroups.com...
>I have an extended multi select list box on one of my forms. As an
example the list box would contain a list of vendors including a
'default' vendor called "Unknown". As an FYI, the query that drives
the list box is written such that the Unknown vendor is listed first
followed by all 'real' vendors alphabetically. The list box is
formatted so that six vendors out of approximately seventy display at
one time. I want to keep that size. Is theer a way to code a button
to scroll the list box to the first/last item in the list rather than
just mark a given record as selected?

May 29 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1457
by: sumGirl | last post by:
Hi. I have an HTML app that includes a psuedo drop-down menu I created using some css and some vbs. It looks like so: ---------- | option1 <-- vertical scroll bar option2 | option3 | option4 | option5 |
2
1695
by: lawrence | last post by:
I thought I was fighting a PHP problem, so I asked about this on a PHP list, but they felt it was a Javascript problem, so I'm reposting a bit of the debate here. Could this Javascript, below, possibly trigger a redirect in Netscape, and send the browser to a file called "0". Cause what is happening is on load, in Netscape, the page redirects to something like: http://www.myDomain.com/0
1
6866
by: Keltus | last post by:
Hello, I have a Form with a ListBox in it. I'd like to be able to scroll the ListBox even when it's not in focus. ie. when i scroll the mousewheel when my focus is on the form, I'd like the ListBox to scroll. Now, there are two ways I would think would work. The first is if I can resend the MouseEventArgs to the ListBox but there does not seen to be a way to pass that event along. The second is if I could manually scroll the ListBox...
12
3480
by: Jim H | last post by:
I have a ListBox hold a list of my custom controls (it's UserControl based control with a couple radio buttons and a checkbox). Everything works and displays the way I expected it to. I can move through the list by dragging the scroll bar and it works fine, but if I try to use the up/down scroll bar buttons or page by clicking above or below the scroll thumb button the list does not scroll. Here's my OnDrawItem for the ListBox: ...
6
4317
by: Mike Johnson | last post by:
I have a ListView on a form, I'm displaying the items as a list. The Scroll is set to true. I want to know how can I set the scroll bar to Vertical?
2
3851
by: Umeshnath | last post by:
Hi, I have placed a grid view inside Atlas panel. On click of a button event, data is populated in the grid view, I want to add scroll bar instead of increasing the size of grid view. I have written the following code. <div id="Layer1" style="width:350px; height:140px; z-index:1;overflow-y: scroll"> But the problem was scroll bar will be there if there no data aviabale in
3
6047
by: zazu | last post by:
We have a database that can be accessed by a small number of users on a small network. The database is on the server. One form has a combo box with a large number of selections. Usually there is a scroll bar on the right hand side when the combo box is selected. One user comments that he doesn't always get the scroll bar. The problem is variable - excuse the pun - sometimes the scroll bar is never there, sometimes it disappears after a...
7
5590
by: Lit | last post by:
Hi, How can I capture the vertical scroll bar position for a Listbox. I have a Listbox of 100 items + when I click on it I post back remove the item selected. After returning to the client browser the list box scroll position is at the top.
4
22132
by: Matthew Cox | last post by:
Hi, I've been searching the net all day today trying to figure out how one would accomplish what I originally thought would be a fairly straight forward and simple thing. The problem I'm trying to solve is that the designer would like to limit the total number of entires shown when you click on the drop-down arrow of a select box. I'm starting to think that this isn't possible. I've tried the following with no luck:
0
8335
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8747
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8528
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
1976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.