Article ID: 166929
Article Last Modified on 3/2/2005
Private Sub DBCombo1_Click(Area As Integer)
If DBCombo1.DataChanged Then
' Any code that would normally be in the Change Event
' or call the Change event like this: DBCombo1_Change
' followed by code that resets the DataChanged property, such as:
DBCombo1.DataChanged = False
End IF
End Sub
If the user normally tabs to the DBCombo control and then uses arrow keys
to navigate to an item in the list, similar code would be required in the
KeyPress, KeyDown and/or KeyUp event procedures. In this case, it would be
more effective to write a single form-level module to replace the code of
the DBCombo Change event and call it from the various places where the
DBCombo.DataChanged property would be tested.
Name Data1
DatabaseName C:\Program Files\DevStudio\VB\Biblio.mdb (or the
appropriate path to that database)
RecordsetType 0 - Table
RecordSource Titles
Name Data2
DatabaseName C:\Program Files\DevStudio\VB\Biblio.mdb (or the
appropriate path to that database)
RecordsetType 2 - Snapshot
RecordSource SELECT PubID, Name FROM Publishers ORDER BY Name
Name DBCombo1 BoundColumn PubID DataField PubID DataSource Data1 ListField Name RowSource Data2 Style 0 [ASCII 150] dbcDropDownCombo
Private Sub DBCombo1_Change()
Debug.Print "In the Change Event Method"
End Sub
Keywords: kbbug kbfix kbcontrol KB166929