How To Implement a MatchedWithList Validation Check in a ComboBox Control (266265)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q266265 SUMMARY
A simple ComboBox control whose Style property has been set to 0-Dropdown Combo permits a user to manually make an entry into its text edit portion without selecting a value displayed in its drop-down list. The simple ComboBox control does not expose a Boolean property (identical to the MatchedWithList property of the OLEDB DataCombo control) that can be used to determine if the value that is keyed into the edit portion matches one of the elements in the list. This is an important validation check that can be very useful when using a simple drop-down ComboBox.
A generic, reusable routine can be written by using Visual Basic code to implement this validation check for a simple drop-down ComboBox control. This article documents the reusable code that can be used to address this requirement.
Modification Type: | Minor | Last Reviewed: | 7/1/2004 |
---|
Keywords: | kbhowto KB266265 |
---|
|