السلام عليكم ورحمة الله وبركاته
في المثال المرفق يقرأ البرنامج الداتا إلى الشجرة والمشكلة أن القرآئة تكون من (Z إلى A ) والمفروض أن تكون من (A إلى Z )
الرجاء المساعدة في تعديل الكود
وشكرا
السلام عليكم ورحمة الله وبركاته
في المثال المرفق يقرأ البرنامج الداتا إلى الشجرة والمشكلة أن القرآئة تكون من (Z إلى A ) والمفروض أن تكون من (A إلى Z )
الرجاء المساعدة في تعديل الكود
وشكرا
اعكس الطريقه بدل ما تروح اول الملف اذهب الى اخر الملف ثم تحرك الرسجلات بالعكس
علامه ******* هي التغير
'rsSections.MoveFirst '***************'
rsSections.MoveLast '<-----*********
Set tvCodeItems.ImageList = Nothing
Set tvCodeItems.ImageList = ImageList1
'
' Populate the TreeView Nodes
'
With tvCodeItems.Nodes
.Clear
.Add , , "ROOT", "ALPHABET", "BOOK"
'
' Make our Root Item BOLD
'
BoldTreeNode tvCodeItems.Nodes("ROOT")
'
' Now add all nodes into TreeView, but under the root item.
' We reparent the nodes in the next step
Do Until rsSections.BOF 'rsSections.EOF '*****<-----
sParent = rsSections("ParentID").Value
sKey = rsSections("ID").Value
sText = rsSections("Description").Value
Set nNode = .Add("ROOT", tvwChild, "C" & sKey, sText, "BOOK")
'
' Record parent ID
nNode.Tag = "C" & sParent
'rsSections.MoveNext '******
rsSections.MovePrevious '<-----
Loop
End Withالأخ الفاضل ...
فى الدالة FillTree قم بتغير طريقة الترتيب فى جملة sql من
Set rsSections = mDB.OpenRecordset("select * from codeitems order by ID", dbOpenSnapshot)إلى
Set rsSections = mDB.OpenRecordset("select * from codeitems order by ID DESC", dbOpenSnapshot)أو الأفضل
Set rsSections = mDB.OpenRecordset("select * from codeitems order by Description DESC", dbOpenSnapshot)شكراً
Nothing is impossible, the word impossible itself says that: I M - Possible
شكرا لكما وجزاكما الله خيرا
الطريقتان نافعتان
هذا الموضوع مغلق.