Solved

Listbox change problem

Posted on 2002-06-05
7
245 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:mnasman
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

708 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

15 Experts available now in Live!

Get 1:1 Help Now