Solved

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

Posted on 1997-11-07
9
192 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
  • 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
 
LVL 3

Expert Comment

by:ESI
ID: 1440116
Try the SelChange event then
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

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:sgroner
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
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…

747 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

13 Experts available now in Live!

Get 1:1 Help Now