تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[كود] كيف أربط Combobox معTextBox_TextChanged
#1
بسم الله الرحمان الرحيم
السلام عليكم
أريد ربط Combobox مع TextBox_TextChanged لكي يكون لكل خيار من الكمبوبوكس كود محدد في textbox_textchanged
1

Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged

        repto.Clear()
        nota = New OleDbDataAdapter("select * from Table1 where Name1 like'%" & TextBox1.Text & "%'", con)
        nota.Fill(repto)
    End Sub

2
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
        repto.Clear()
        nota = New OleDbDataAdapter("select * from Table1 where Name2 like'%" & TextBox1.Text & "%'", con)
        nota.Fill(repto)
    End Sub
الرد }}}
تم الشكر بواسطة:
#2
(16-05-20, 08:57 AM)paveldida كتب :
بسم الله الرحمان الرحيم
السلام عليكم
أريد ربط Combobox مع TextBox_TextChanged لكي يكون لكل خيار من الكمبوبوكس كود محدد في textbox_textchanged
1

Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged

        repto.Clear()
        nota = New OleDbDataAdapter("select * from Table1 where Name1 like'%" & TextBox1.Text & "%'", con)
        nota.Fill(repto)
    End Sub

2
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
        repto.Clear()
        nota = New OleDbDataAdapter("select * from Table1 where Name2 like'%" & TextBox1.Text & "%'", con)
        nota.Fill(repto)
    End Sub


وعليكم السلام و رحمة الله و بركاته

تستطيع استخدام قاعدة if 
و تقوم بربطها اما ب combobox selected index او combobox text

كود :
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged

If combobox1.text = "option1" then
       repto.Clear()
       nota = New OleDbDataAdapter("select * from Table1 where Name1 like'%" & TextBox1.Text & "%'", con)
       nota.Fill(repto)

else If combobox1.text = "option2" then

repto.Clear()
       nota = New OleDbDataAdapter("select * from Table1 where Name2 like'%" & TextBox1.Text & "%'", con)
       nota.Fill(repto)


end if

   End Sub
الرد }}}
تم الشكر بواسطة: ابراهيم ايبو
#3
(16-05-20, 12:38 PM)WaeLx كتب :
(16-05-20, 08:57 AM)paveldida كتب :
بسم الله الرحمان الرحيم
السلام عليكم
أريد ربط Combobox مع TextBox_TextChanged لكي يكون لكل خيار من الكمبوبوكس كود محدد في textbox_textchanged
1

Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged

        repto.Clear()
        nota = New OleDbDataAdapter("select * from Table1 where Name1 like'%" & TextBox1.Text & "%'", con)
        nota.Fill(repto)
    End Sub

2
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
        repto.Clear()
        nota = New OleDbDataAdapter("select * from Table1 where Name2 like'%" & TextBox1.Text & "%'", con)
        nota.Fill(repto)
    End Sub


وعليكم السلام و رحمة الله و بركاته

تستطيع استخدام قاعدة if 
و تقوم بربطها اما ب combobox selected index او combobox text

كود :
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged

If combobox1.text = "option1" then
       repto.Clear()
       nota = New OleDbDataAdapter("select * from Table1 where Name1 like'%" & TextBox1.Text & "%'", con)
       nota.Fill(repto)

else If combobox1.text = "option2" then

repto.Clear()
       nota = New OleDbDataAdapter("select * from Table1 where Name2 like'%" & TextBox1.Text & "%'", con)
       nota.Fill(repto)


end if

   End Sub
بارك الله فيك أخي 
الرد }}}
تم الشكر بواسطة:
#4
(16-05-20, 02:44 PM)paveldida كتب :
بارك الله فيك أخي 

و اياكم
الرد }}}
تم الشكر بواسطة:


المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  [سؤال] طريقة توسيط النص داخل اداة comboBox سمير1404 7 3,858 24-08-25, 01:01 PM
آخر رد: أبو خالد الشكري
  كيف أضيف المواد في ComboBox إلى ComboBox آخر في فورم آخر F.H.M 13 870 25-09-24, 11:05 PM
آخر رد: Taha Okla
  كيف اتعامل مع databindings و ال combobox سلام و محبه 2 461 24-03-24, 05:00 AM
آخر رد: سلام و محبه
  [VB.NET] استدعاء بيانات في TextBox بناء على combobox loay775 2 700 18-01-24, 05:07 PM
آخر رد: loay775
  تعبئة CheckListBox من قاعدة البيانات حسب الإختيار من Combobox صالح عبدالله 1 667 14-10-23, 10:26 PM
آخر رد: aljzazy
  طباعة قائمة combobox الى ملف PDF Tajaldeen 2 862 14-02-23, 11:19 PM
آخر رد: estefsar
  [VB.NET] طريقة عرض قيمة المحدد من ComboBox فراس الغزي 9 4,034 18-12-22, 12:03 AM
آخر رد: kebboud
  [VB.NET] مشكلة في combobox ali_ahmed12 10 1,825 28-09-22, 04:05 PM
آخر رد: ali_ahmed12
  [VB.NET] مشكلة عند تحميل البيانات داخل الكمبوبوكس ل combobox MahmoudZabady 0 742 12-09-22, 05:12 PM
آخر رد: MahmoudZabady
  كيف أربط الموبايل بالفيجوال بيسك وقراءة الباركود بالكاميرا ونقله للتكست بوكس جيولوجي مبتدئ 2 1,922 23-03-22, 03:32 AM
آخر رد: جيولوجي مبتدئ

التنقل السريع :


يقوم بقرائة الموضوع: