Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Listbox change problem

Posted on 2002-06-05
7
Medium Priority
?
252 Views
Last Modified: 2010-05-02
Hello,
I have the following problem.
In one of my VB forms i have a list box with values from db. But the list box is just enough to show a single entry. But it contains the key field so when it changes i have to change values for other fields in the screen.
But when the user clicks on either the up or down buttons of the listbox the value that is displayed in the listbox changes but it will not be selected and hence all the other field values remain the same.
Since there is no change event how should i take care of this issue?
0
Comment
Question by:ravi_raj123
7 Comments
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 7057179
try to put ur code in the Click even instead of Change event of the List Box
0
 
LVL 5

Expert Comment

by:rpai
ID: 7057182
Please close all your open questions:-
Questions Asked 13
Last 10 Grades Given A A B B A B B  
Question Grading Record 7 Answers Graded / 7 Answers Received
0
 
LVL 3

Expert Comment

by:SirNick
ID: 7057183
Hi

Have you tried the scroll event?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:Steve Sirica
ID: 7057284
Why not just use a combo box instead of a list box?  It sounds like it would be a better fit here.  You use a list box when you want to show a few items at once...you're only showing one.  At least a combo box would show the selected one, once you scroll the selected item out of view in a list box it can get confusing to the user.

Just a thought..
Steve
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7057477
I am with SSirica's comment.
0
 

Accepted Solution

by:
HobbitHouse earned 200 total points
ID: 7057900
check out the topindex property.  you can always query what element is displayed in a one-line display list box.
0
 
LVL 4

Author Comment

by:ravi_raj123
ID: 7058617
Thanks HobbitHouse for your answer.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question