Sorting Columns In Forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What command would I use assign to a button on a form that would sort data on
the form. I have several columns and would like to have several buttons (one
for each column) that a user can click to sort the respective columns.

Thanks in advance!

Aaron G
Philadelphia, PA
 
In the click event of each button, put:

txtYourName.SetFocus
DoCmd.RunCommand acCmdSortAscending

Replace txtYourName with the name of the text box for each field.

Good luck.

Sco

M.L. "Sco" Scofield, Microsoft Access MVP, MCSD, MCP, MSS, A+
Denver Area Access Users Group Vice President www.DAAUG.org
MS Colorado Events Administrator www.MSColoradoEvents.com
Useful Metric Conversion #18 of 19: 8 nickels = 2 paradigms (My personal
favorite)
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 
You're welcome.

Sco

M.L. "Sco" Scofield, Microsoft Access MVP, MCSD, MCP, MSS, A+
Denver Area Access Users Group Vice President www.DAAUG.org
MS Colorado Events Administrator www.MSColoradoEvents.com
Useful Metric Conversion #18 of 19: 8 nickels = 2 paradigms (My personal
favorite)
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 
This process works with forms that pull from queries that are based on
criteria boxes. Other solutions to this issue don't work with form-based
queries.

Thank you for this info, works great.
 
Back
Top