BUG: DBCombo Does Not Display the "&" Character CorrectlyLast reviewed: November 19, 1997Article ID: Q176873 |
The information in this article applies to:
SYMPTOMSIf a DBCombo control contains items with the ampersand (&) character as part of the text and if the style of the DBCombo control is dbcDropdownList, then the text will not display correctly in the text box portion (the edit area) of the control. The drop-down list area is not affected. This problem does not occur with the styles dbcDropdownCombo or dbcSimpleCombo.
RESOLUTIONTo work around this problem, simply modify the text to include an extra "&" for every "&" that is in the original text as shown in the following code:
Private Sub DBCombo1_Click(Area As Integer) Dim i As Integer Dim s As String Dim c As String * 1 If DBCombo1.Style = dbcDropdownList And Area = dbcAreaList Then s = DBCombo1.Text If InStr(s, "&") Then DBCombo1.Text = "" For i = 1 To Len(s) c = Mid$(s, i, 1) If c = "&" Then DBCombo1.Text = DBCombo1.Text & "&&" Else DBCombo1.Text = DBCombo1.Text & c End If Next End If End If End Sub STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Behavior
Keywords : vb5all Version : WINDOWS:5.0 Platform : WINDOWS Issue type : kbbug |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |