BUG: ????? DBCombo SelectedItem ?? ??? ??????? ??? ????? ????? ???????

?????? ????????? ?????? ?????????
???? ???????: 281940 - ??? ???????? ???? ????? ????? ??? ???????.
??? ????? ??? ???????. ????? "??? ??" ??? ??? ??????? ??? ????.
????? ???? | ?? ????

?? ??? ??????

???????

??? ??????? ????? ????? ?????? ?? ???? ??? ???? ?????? DBCombo ?? DBList32.ocx ?? ??? ????? ??????? SelectedItem ?? DBCombo ?? ???? ??????? ??????? ??? ?????? ?????.

????

????? ???? ????? ????? ?? Microsoft ???? ????? ??? ?? ?? ??????? ??????? ?? ??? ??????? ???. ?????? ??? ??? ????? ????????? ???? ????? ??? ??????? ????????. ?? ??? ????? ???????? ?????? ??? ??? ???????. ?????? ??? ?? ??? ????? ??? ??????? ??????? ???? Microsoft ????????? ??? ??????? ?????? ?? ???? ?????? Visual Studio ???? ????? ??? ??? ???????.

??? ??? ??????? ?????? ???? ?????? Microsoft "????? ?????" ?????? ??? ???????. ?????? ??? ????? ????? ?????? ?????? ????? ??? ?????? Microsoft ???? ??????? ??? ?????? ?????? ?? ?????? ???? Microsoft ?????? ??? ?????:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
??????: ?? ??? ???????? ?? ??? ????? ????????? ???? ?????? ????? ??? ??????? ????? ??? ??? ?????? ????? ??? Microsoft ?? ??????? ?????? ??? ???? ??? ?? ???????. ???? ????? ?????? ????? ???????? ??? ????? ????? ???????? ????????? ???? ?? ???? ??? ???? ??? ???????.

??????: ??? ?? ???? ???? ??????? ????? Visual Studio ?????? ??? ??? ???????.

?????

???? Microsoft ?? ??? ??? ?? Microsoft ???????? ??????? ?? ????? ??? ???????.

??????? ????

??? ?????? ?? ??? ??????? DBCombo ???? ??????? ????? ??????? SelectedItem ??? ??????? ?????? ???? ????? ????????? ?????? ???? ????? ?????? ?? Recordset ?????? ?????? ???? ????? ????_????. ??? ????? ??? ??????? ?? ??? ??? ???????? ?????? ???? ?? ???? ???????? ?????? ??????. ????????? ??? ??????? ???? ????? ?????? ?? ???? ??? ???? ?????? ??? ????? ????? ??????? SelectedItem ??? ????? ??? ????? ??? ?? ??????? ?? ???? ??????? ENTER. ???????? ??? ???? ??? ?? ???? ???? ?? DBCombo ??????? ??????? ??? ?????? ?????. ??? ???? ?? ???? ??? ??????? ??? ??????? ???????? ????? ???? ??? ?????? "?" ?????? "?????? ????" ??????? ?? Visual Basic 6.0.

????? ????? ????? ??????

  1. ????? ????? EXE ????? ????. ??? ????? Form1 ???? ???????.
  2. ?? ??????? ??????? ???? ??? ?????? ??? ???? ???????? ???????? ???? ????? ????? 6.0 ??? ?? ???? ??? ?????.
  3. ????? ????? ???????? "??? ?????? ? DBCombo1 ? Form1.
  4. ????? ???? ?? ????? ? ????1 ? ????2.
  5. ????? ???? ???? ?????? Data1.
  6. ?? ?????? ??????? ????? ????? ?????? ??? ??? ???:
    Data1 - ?????? ??????
    DatabaseName = Biblio.mdb
    ????_???? = ????
    ReadOnly = True

    ????2 - ???? ???? ???? ??
    DataSource = Data1
    DataField = ??????
    ????? = ???

    DBCombo1 - ????? ???? ??? ?????? ???? ??????
    ????_???? = Data1
    ListField = ??????
  7. ?? ?????? ????????? ???????? ??????? ??? ?????? Declarations ??? Form1:
    Option Explicit
    
    Private Const UP_ARROW = 38
    Private Const DOWN_ARROW = 40
        
    Private Sub Data1_Reposition()
       '
       ' Copy Text from Bound Text2 to Unbound Text1.
       Text1.Text = Text2.Text
    End Sub
        
    Private Sub DBCombo1_KeyUp(KeyCode As Integer, Shift As Integer)
       Dim bmk As Variant
       Dim x As Integer
       Dim msg As String
    
       On Error GoTo ErrHandler
       '
       ' Save Bookmark on CR and Arrow Key Activity.
       Select Case KeyCode
          Case Asc(vbCr), UP_ARROW, DOWN_ARROW
              msg = "DBCombo1.SelectedItem has the value "
              bmk = DBCombo1.SelectedItem
              ' The next line raises error 13 if bmk has no value.
              For x = 0 To UBound(bmk)
                  msg = msg & bmk(x)
              Next x
              Data1.Recordset.Bookmark = bmk
              Debug.Print msg
       End Select
       Exit Sub
                
    ErrHandler:
       If Err.Number = 13 Then   ' Type mismatch
          Debug.Print "DBCombo1.SelectedItem is not assigned a value."
       Else
          MsgBox "Error " & Err.Number & ": " & Err.Description, vbCritical _
             + vbOKOnly
       End If
    End Sub
    
    Private Sub Form_Load()
       Text1.Text = ""
       DBCombo1.Text = ""
    End Sub
    					
  8. ?? ?????? ??????? ?? ???? ??? ???? ?????? ?? ????? ?? ???? ???? ???? DBCombo (??? Curry Dave).
  9. ???? ENTER. ???? ??? ????? ??????? DBCombo1.SelectedItem.
  10. ?? ?????? ????? ???? ?? DBCombo ?? ???? ??? ????? ??? ????????? ?? ??????? (??? Wellin ???).
  11. ???? ????? "??? ?????" ?? "??? ?????. ???? ??? ??? ????? DBCombo1.SelectedItem ?? ??????? ???????? ?? "Wellin ???".

???????

???? ???????: 281940 - ????? ??? ??????: 28/???? ??????/1435 - ??????: 3.2
????? ???
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic 6.0 Learning Edition
????? ??????: 
kbnosurvey kbarchive kbmt kbbug kbcodesnippet kbctrl kbpending kbprb KB281940 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????281940

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com