Solved

Listbox change problem

Posted on 2002-06-05
7
247 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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 50 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JSON Response and request in VB6 application 11 385
VBA/SQL - Connect to SQL server and pull data 4 106
Crystal reports - Formula Field code need assistance with code 17 60
vbModal 12 51
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

815 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now