|
-
Jun 20th, 2002, 05:34 AM
#1
Thread Starter
Member
Combobox change
I have a combobox whose list is populated from a database, and i want that everytime the user selects an item in the combobox, it modifies the recordsource of an adodc.
I set the combobox style to 2 (dropdownlist) because I dont want the user to alter its value.
The problem is that the Change event is never triggered, so how do I know the user selected an item. I thought of using a timer and checking periodically, but there must be a simple way !
Thx for help !
[edit] I know Validate is triggered when one leaves the control, but want the display to be refreshed even if the user doesnt leave the combo, like just hitting the up/down arrows. Example of this is in the windows display properties, when you select a screen saver, it displays it immediately.[/edit]
Last edited by LeBlatt; Jun 20th, 2002 at 05:40 AM.
-
Jun 20th, 2002, 05:38 AM
#2
Try the click event.
I would keep the current value in a global var.
If is is the same as the previous you don't need to repopulate your adodc
-
Jun 20th, 2002, 06:42 AM
#3
Thread Starter
Member
funny.. I just added
Code:
Private Sub Cmb_World_Click()
Cmb_World_Change
End Sub
and it now works perfectly, even if i solely use keys, no mouse.
To save useless refreshes I used :
Code:
Private Sub Cmb_World_Change()
If Cmb_World <> sCurrWorld Then
sCurrWorld = Cmb_World
DoSomeStuff
End If
End Sub
thx for the tip
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|