اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

طريقة اظهار النتائج والكومبوبوكس فارغ


إذهب إلى أفضل إجابة Solved by أ / محمد صالح,

الردود الموصى بها

لو سمحتوا أرجوا المساعدة انا مصمم فورم للبحث ببحث فية بين تاريخين وبشرطين ان يكون ComboBox28 = العمود 4 و ComboBox32 = العمود 5 وهو شغال كويس جداً بس عاوز تعديل بسيط فية لو سمحتوا أن لما يكون combobox32 فارغ يظهر جميع النتائج الموجودة داخل الكومبو بوكس مش شرط يكون فى بيانات

المعذرة مش عارف ارفق ملف لان حجمه كبير جدا

أرجو الإفادة من حضراتكم  ... ودا الكود

دا حضرتك ملف عاملة بسرعة لان الأخر حجمة كبير ويوحى لنفس الفكرة البحث شغال كويس جدا لكن أريد عندما يكون ComboBox4 فارغ ولم يتم تحديد أى مقاس منه يقوم بالبحث من خلال COMBBOX3 فقط 

أرجو الإفادة من حضراتكم للضرورة

إن شاء الله أكون قدرت أوصل وجهت نظرى لحضرتك

On Error Resume Next
Dim sh As Worksheet
Set sh = Sheets("ÕÑÝ Òì")
Dim i, x As Long
Me.ListBox6.Clear
For i = 3 To 10000
If sh.Cells(i, 3) >= CDate(Me.TextBox61) And sh.Cells(i, 3).Value <= CDate(Me.TextBox60) _
And sh.Cells(i, 4) = Me.ComboBox28 And sh.Cells(i, 5) = Me.ComboBox32 Then
Me.ListBox6.AddItem sh.Cells(i, 2).Value
Me.ListBox6.List(ListBox6.ListCount - 1, 1) = sh.Cells(i, 3).Value
Me.ListBox6.List(ListBox6.ListCount - 1, 2) = sh.Cells(i, 4).Value
Me.ListBox6.List(ListBox6.ListCount - 1, 3) = sh.Cells(i, 5).Value
Me.ListBox6.List(ListBox6.ListCount - 1, 4) = sh.Cells(i, 6).Value
Me.ListBox6.List(ListBox6.ListCount - 1, 5) = sh.Cells(i, 7).Value
Me.ListBox6.List(ListBox6.ListCount - 1, 6) = sh.Cells(i, 8).Value
End If
Next i

 

رابط هذا التعليق
شارك

  • أفضل إجابة

يمكنك تعديل الشرط في زر البحث إلى التالي

If sh.Cells(i, 3) >= CDate(Me.TextBox15) And sh.Cells(i, 3).Value <= CDate(Me.TextBox16) _
And sh.Cells(i, 4) = Me.ComboBox3 And (sh.Cells(i, 5) = Me.ComboBox4 Or Me.ComboBox4 = "") Then

وإضافة استدعاء زر البحث بعد مسح قائمة المقاس

Private Sub CommandButton52_Click()
Me.ComboBox4.Value = ""
CommandButton51_Click
End Sub

بالتوفيق

  • Like 2
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information