Sort asc / dec

  • Thread starter Thread starter ChrisJansen
  • Start date Start date
C

ChrisJansen

Guest
Continuous form:
The standard menu / toolbar commands sort ASC and DEC work just fine.
However, if I define a button with the VBCode
"DoCmd.RunCommand acCmdSortAscending", I get an alarm message pop-up
saying "the command or action "SortAscending" isn't available now".
I made sure that the standard menu items "Sort asc / dec" are not grayed out(disabled) at the time I click the button in runtime. The mouse cursor points to the desired sort criteria field.

Any advice?

Regards from Belgium (pretty cold here)
 
Is your form actualy a subform? If so, and if you put the command button on the main form, the subform would have lost its focus and your code would be unable to sort the main form.

Regards from Québec (pretty warm here)
 
No subform

No, it is not a subform.
The button is located in the actual form's footer, where the
data is contained in the detail section.

Thanks for the reply.
 

Users who are viewing this thread

Back
Top Bottom