Solved

How to trriger an event when data in DBCombo is changed?

Posted on 1997-11-07
9
198 Views
Last Modified: 2008-03-06
I want to enable or disable a ListBox on the basis of a certain value of a DBCombo control. I have used mouseup and click and it works when these events are triggered but if I change it with keyboard it does not work. I have used change event but it does not work. I will be thankful for a suggestion.
khawarjawad@hotmail.com
0
Comment
Question by:Khawar091697
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 3

Expert Comment

by:ESI
ID: 1440113
The best way is to use either a static or global flag (a boolean variable) to "lock" the control, or check it's enable property to  immediately exit the event.

Hope it helps
0
 

Author Comment

by:Khawar091697
ID: 1440114
Edited text of question
0
 

Author Comment

by:Khawar091697
ID: 1440115
This is not my requirement. I want to know that which 'single event' is triggered when we change item either by mouse or by keyboard.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 3

Expert Comment

by:ESI
ID: 1440116
Try the SelChange event then
0
 

Author Comment

by:Khawar091697
ID: 1440117
But DBCombo don't have such event as SelChange? Kindly tell me some other way?
Thank You!
0
 
LVL 1

Expert Comment

by:Steve Groner
ID: 1440118
Perhaps you should check into subclassing the Combo box, capture the drop down, change, or roll up event if needed.
0
 

Author Comment

by:Khawar091697
ID: 1440119
Thank you Mr. sgroner for having a comment on my question.

Can you please explain, what does the term "subclassing the ComboBox" refer to? I cannot undrstand that.
0
 

Accepted Solution

by:
Grant082997 earned 20 total points
ID: 1440120
If you are using the DBCombo that came with VB5, then you should install service pack 2.  This corrects the problem of the DBCombo_Change event not firing.

For more info, check out http://support.microsoft.com/support/kb/articles/Q171/7/98.asp
0
 

Expert Comment

by:Grant082997
ID: 1440121
I was mistaken.  The correct web page for this is http://support.microsoft.com/support/kb/articles/Q171/8/04.asp

Sorry about that.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

696 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