开发者

How to make a sorting button on access?

开发者 https://www.devze.com 2022-12-13 07:48 出处:网络
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 on

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
0

精彩评论

暂无评论...
验证码 换一张
取 消