如何使用VBA在MS Access中使用向上和向下键对列表框项进行重新排序? [英] How to reorder listbox items with up and down keys in MS Access using VBA?
本文介绍了如何使用VBA在MS Access中使用向上和向下键对列表框项进行重新排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我在弄清楚如何上下移动列表框中的项目时遇到了麻烦.列表框是从Access数据库中的表加载的.我正在尝试使用替代"功能来重新排序某些项目的优先级.我似乎无法弄清楚如何在MS Access中做到这一点!!有人可以帮帮我吗!
提前致谢! :-D
Hello,
I am having trouble figuring out how to move items in a listbox up and down. The listbox is loaded from a table in the Access Database. I am trying to use an "override" feature to reorder the priortiy of certain items. I cannot seem to figure out how to do this in MS Access!!. Could someone please help me out!
Thanks in Advance! :-D
推荐答案
所以,您是从Access进行编程的,对吗?我讨厌那种环境!
与其尝试覆盖方法,不如不将一列称为优先级"添加到表中,然后将组合框绑定至表,而不是将组合框绑定至按优先级排序的SQL语句或查询.然后,当您更改项目的优先级时,只需重新绑定表即可.
So, you''re programming from within Access, correct? I hated that environment!
Instead of trying to override a method, why not add a column to your table called Priority and then instead of having the combobox bound to a table, bind it to a SQL statement or query that sorts by priority. Then, when you change the priority of an item, just rebind the table.
这篇关于如何使用VBA在MS Access中使用向上和向下键对列表框项进行重新排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文