الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

columnCount problem in listBOX - MS Access 2003

مغلق
بدأه maro009 في 13 مايو 2006 · 1 رد · 835 مشاهدة · في لغة Ms Visual Basic 6 وما قبلها من إصدارات
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

i created empty list box in form with columncount 1

now i have 3 different select statemnt, they will have different column result , is there is any way to set the columncount dynamiclly?

but when i try to print the result in the listBox i always get only the first column (this is true coz i set the column count to 1)

'customerNameCB = comboBox

'SearchB = Button

'productsCB = comboBox

''addressCB = comboBox

here is the method

Private Sub SearchB_Click()
Me.SearchB = Me.SearchB.DefaultValue

Dim querystirng As String
resultList.ColumnHeads = True

querystirng = ""


If customerNameCB.Enabled = True And (customerNameCB.Value <> customerNameCB.DefaultValue) Then
querystirng = "select le_Order.Order_id, le_Order.OrderDate, orderline.ProductID, Product.Model, Product.[Description] from le_Order,orderline,product where le_Order.Order_id = orderline.orderid And orderline.ProductID = product.ProductID And le_Order.Customer_id ='2'"

ElseIf productsCB.Enabled = True And (productsCB.Value <> productsCB.DefaultValue) Then
querystirng = "select distinct le_Order.Order_id, le_Order.OrderDate, le_customer.CustomerName,le_customer.Adress,orderline.Quantity from le_Order,orderline,product,le_customer where le_Order.Order_id = orderline.orderid And le_Order.Customer_id =le_customer.customer_id And orderline.ProductID = '40';"

ElseIf addressCB.Enabled = True And (adressCB.Value <> addressCB.DefaultValue) Then
querystirng = "select le_Order.Order_id, le_Order.OrderDate from le_order "

End If

If (querystirng <> "") Then
resultList.RowSource = querystirng
End If

Me.SearchB = Me.SearchB.DefaultValue


End Sub

now if i use this i get only one coulmn of the result

#2

عربي :

أخي الكريم يجب عليك

إستخدام

Lisbox

في

Microsoft Common Control 6

إستخدم ذلك وقم بإضافة الحقول

بــ

listbox1.colums.add()

هنا تقوم بإضافة الحقول التي تريد إضهارها من قاعدة البيانات ..

موفق

الحاج نفبيل

برمجة عامة

---------

إنجليزي :

You Must Be Use The Compenent "List Box " You can Found That in The

Componeent "Microsoft Common Control 6 "

and You can add The List Header Here :

Listbox1.colums.add(Instruction Type )

Good Luck

Elhadj Nekbil

Public Programing

هذا الموضوع مغلق.

مواضيع مشابهة