Private Sub ComboBox_FirmaUnvani_Change()
Dim bul As Range, kontrol As Control
For Each kontrol In Me.Controls
If kontrol.Name <> Me.ComboBox_FirmaUnvani.Name Then
Select Case TypeName(kontrol)
Case Is = "TextBox": kontrol.Value = Empty
Case Is = "ComboBox": kontrol.Value = Empty
End Select
End If
Next
With ThisWorkbook.Sheets("ORDER_LIST")
Set bul = .Range("C:C").Find(Me.ComboBox_FirmaUnvani.Text, , xlValues, 1)
If Not bul Is Nothing Then
Me.TextBox_FirmaAdi.Value = .Range("B" & bul.Row).Value
Me.TextBox_SiparisVeren.Value = .Range("E" & bul.Row).Value
Me.TextBox_Gsm.Value = .Range("F" & bul.Row).Value
Me.TextBox_Email.Value = .Range("G" & bul.Row).Value
Me.ComboBox_Temsilci.Value = .Range("L" & bul.Row).Value
Me.ComboBox_Sehir.Value = .Range("M" & bul.Row).Value
Me.ComboBox_Ilce.Value = .Range("N" & bul.Row).Value
End If
End With
Set bul = Nothing
End Sub
Private Sub ComboBox_FirmaUnvani_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim bul As Range, kontrol As Control
For Each kontrol In Me.Controls
If kontrol.Name <> Me.ComboBox_FirmaUnvani.Name Then
Select Case TypeName(kontrol)
Case Is = "TextBox": kontrol.Value = Empty
Case Is = "ComboBox": kontrol.Value = Empty
End Select
End If
Next
With ThisWorkbook.Sheets("ORDER_LIST")
Set bul = .Range("C:C").Find(Me.ComboBox_FirmaUnvani.Text, , xlValues, 1)
If Not bul Is Nothing Then
Me.TextBox_FirmaAdi.Value = .Range("B" & bul.Row).Value
Me.TextBox_SiparisVeren.Value = .Range("E" & bul.Row).Value
Me.TextBox_Gsm.Value = .Range("F" & bul.Row).Value
Me.TextBox_Email.Value = .Range("G" & bul.Row).Value
Me.ComboBox_Temsilci.Value = .Range("L" & bul.Row).Value
Me.ComboBox_Sehir.Value = .Range("M" & bul.Row).Value
Me.ComboBox_Ilce.Value = .Range("N" & bul.Row).Value
End If
End With
Set bul = Nothing
End Sub
Feraz Hocam Yardımlarınız için teşekkür ederim. Kodu hem değiştiginde hemde çıkıldığında yordamlarına yazdım ama işlem sonucunda sadece sipariş tarihindeki form yüklendiğinde otomatik gelen günün tarihi bilgisi silindi fakat textbox ve comboboxlara değerler gelmedi.
Access Çekirgesi