You need to shut up. You have provided nothing to this forum. Look at your Thanks (0) versus DBGuy. You want nothing but to be spoon fed. That is not the way it works. He provided good advice. So do some work or go away. You are a leach.If I was to help, I would say "click here, and select option a. Type code to make the combo box work."
That is helping someone
I would like to create a combo box that sorts a-z or z-a? How should I go about this to sort data in a list box?
In reviewing his other posts...that's what he always wants!You want nothing but to be spoon fed.
Wondering if a lot of what follows your comment stems from a misunderstanding. I read it as "sort A to Z or sort Z to A" meaning inclusive and either ascending or descending. Then again, I have no history with the OP so please ignore this if I'm out of place.If you only have two options, it might be better to use a radio or toggle button. Just a thought...
Hi. In the AfterUpdate event of the combobox, you could try something like:theDBguy, that is correct. The combo box would be just two items base on a value list of a-z or z-a to sort a listbox alphabetically. I am assuming the only way to accomplish this would be with a requery. Is there an example or tutorial out there for this solution?
If Me.ComboboxName="a-z" Then
Me.Listbox.RowSource="SELECT * FROM TableName ORDER BY FieldName
Else
Me.Listbox.RowSource="SELECT * FROM TableName ORDER BY FieldName DESC
End If
If Me.ToggleButton Then
Me.Listbox.RowSource="SELECT * FROM TableName ORDER BY FieldName
Else
Me.Listbox.RowSource="SELECT * FROM TableName ORDER BY FieldName DESC
End If
I was thinking along the same line... Cheers!Dont see the sense in a combo with a list just to apply a sort.
Hi. You’re welcome. We’re all happy to assist. Even if sometimes it doesn’t appear so, we do try to help. Cheers!Thank you everyone for your help, and thank you theDBguy