Bugs in OrderByOn property in Microsoft Access 2010
The setup is a mySQL database on a remote server, using MS Access 2010 as front-end user interface.
Problem occurs in forms based on underlying sorted queries, where default view is Continuous Forms:
OrderByOn property is False by default – not a problem.
User turns on OrderByOn property, using a button which re-sorts records (OrderByOn = True) – not a problem.
User then wants to use original underlying query sort order, using a button that turns off OrderByOn (OrderByOn = False) – there is a problem. Subsequent requeries开发者_高级运维 of the data do not update the form. It appears that the ability to requery the data gets switched off, along with the OrderByOn function.
Problem appears non-trival in that the OrderByOn property does not seem to utilize the underlying mySQL indexes. A significant performance penalty thus seems to be incurred if OrderByOn cannot be switched off, except when absolutely needed.
I hooked up a continuous form to an Address Book in Outlook... played around setting the ordering by right-clicking on the fields and choosing A-Z.. I presume that has the effect of setting OrderBy and OrderByOn...
I pressed CTRL-G to get the Immediate Window up...
Entered:
?Me![Address Book].OrderBy
and got something like this in return...
[Public].[Address Book].[Display Name], [Public].[Address Book].[Email]
Then I ran the command
Me![Address Book].OrderBy = ""
and the forms reverted back to their natural underlying order... no need to touch OrderByOn... ??
精彩评论