行データの取得

  ダブルクリック



  
' *********************************************************
' 決定
' *********************************************************
Private Sub lst郵便番号_DblClick(Cancel As Integer)

    Dim nIdx

    On Error Resume Next
    nIdx = Me.lst郵便番号.ItemsSelected.Item(0)
    If Err.Number <> 0 Then
        Exit Sub
    End If
    On Error GoTo 0
    
    Me.txt郵便番号.Value = Me.lst郵便番号.Value
    Me.txt市区町村.Value = Me.lst郵便番号.Column(2, nIdx)
    Me.txt町域.Value = Me.lst郵便番号.Column(3, nIdx)

End Sub
  



  F4



Form_Load で Me.KeyPreview = True を記述して以下のイベントを作成します

  
' *********************************************************
' キー決定
' *********************************************************
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

    Dim Dummy As Integer

    If KeyCode = &H73 Then
        Call lst郵便番号_DblClick(Dummy)
    End If

  










  infoboard   管理者用   
このエントリーをはてなブックマークに追加





フリーフォントWEBサービス
SQLの窓WEBサービス

SQLの窓フリーソフト

素材

一般WEBツールリンク

SQLの窓

フリーソフト

JSライブラリ