I'm developing an Access DB and I'd like do implement 2 buttons that, when clicked down, sort my subform "SUBForm1" accord开发者_运维百科ing to parameters: asceding alphabetic order by NAME and one another ascending by Month.
Is that possible?
You can use the "acCmdSortAscending" method.
For example;
Private Sub btnSortByName_Click()
Forms!frmYourForm![SUBForm1].SetFocus
[fldName].Form![fldName].SetFocus
DoCmd.RunCommand acCmdSortAscending
精彩评论