Sorting by a field by click of a button

  • Thread starter Thread starter Clay
  • Start date Start date
C

Clay

I have a table called "tblPlayers" with a field in it
called "LOST". My form (frmEntry) is based off this
table (tblPlayers).

I would like to be able to click a button on the form and
have the data that is displayed in the form sorted on
the "Lost" field - which is a checkbox.

Does anyone know what code I can put in the "On-click"
property of my command button to make this happen?

Thanks,

clay
 
I have a table called "tblPlayers" with a field in it
called "LOST". My form (frmEntry) is based off this
table (tblPlayers).

I would like to be able to click a button on the form and
have the data that is displayed in the form sorted on
the "Lost" field - which is a checkbox.

Does anyone know what code I can put in the "On-click"
property of my command button to make this happen?

Thanks,

clay

Isn't is just as simple to right-click on the field and choose the
sort order from either the A-Z or Z-A Tool Buttons, or from the
drop-down menu?

Anyway, if you wish to add another command button to the form, code
it's click event:
Me.OrderBy= "[Lost]"
Me.OrderByOn = True

To remove the new sort, right-click on the form and select
Remove Filter/Sort
 
Back
Top