View Single Post
  #5  
Old May 11th, 2010, 08:10 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default How do I sort a listbox by field

On Tue, 11 May 2010 13:25:26 -0500, "Bruce Rodtnick"
wrote:

Me!lstMailTo.RowSource.OrderBy = Email
Me!lstMailTo.OrderByOn = True
Order By Email


A listbox (unlike a Form) does not HAVE an OrderBy property.

Do as Jeff suggested: use your code to change the listbox's RowSource property
to a SQL string which sorts as you want it.
--

John W. Vinson [MVP]