Matin_Murad
Member
- Local time
- Today, 05:23
- Joined
- Jul 1, 2020
- Messages
- 37
There are letters with numbers
You can't give us sample data and not include pertinent examples. Can you provide a better sample set (with more representative data) and demonstrate how you want it to sort?
There are letters with numbers
Private Sub ASC_Click()
Me.OrderBy = "val([number]) ASC"
Me.OrderByOn = True
End Sub
Private Sub Desc_Click()
Me.OrderBy = "val([number]) Desc"
Me.OrderByOn = True
End Sub
This is what is required sir... Thank youمع مثالك الحالي (لا توجد أحرف وأرقام مختلطة) يمكنك المحاولة
[كود] Private Sub ASC_Click ()
Me.OrderBy = "val ([number]) ASC"
Me.OrderByOn = صحيح
End Sub
تفاصيل فرعية خاصة ()
Me.OrderBy = "val ([العدد]) تنازلي"
Me.OrderByOn = صحيح
End Sub [/ CODE]
كما قيل ، قد يصبح الأمر أكثر تعقيدًا مع مزيج من الأحرف والأرقام.
Are you looking at the correct thread? The OP wanted to use the Sort by property, there is no mention or suggestions of arrays.Please tell us why you don't want to use a query since that is what every one of us would suggest because your data is in a recordset and queries are how you deal with recordsets. Think about what an in memory process using arrays would entail. Then think about how it would be displayed since it can't be displayed using the rows of the form. Start by looking up Bubble sort which is probably the simplest version of in memory sorting
And his example showed the data in a text box.I want ascending: 1, 2, 3, 4, 10, 11, 101, 121, 133 without using queries
There are letters with numbers
Yep, I think I made that overly clear in thread 9.is not going to work unless all the numbers in every record are at the beginning of the value.
Huh? We know exactly the solution used. In thread 11, the OP post the solution used and even explicitly says so.Well the thread has been marked complete with no clue as to the actual solution
so maybe he is expecting to have letters there.And I do not want to change the data type to a number. There are letters with numbers