且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何更改窗体上的控件排序(更改窗体上控件的序号位置) - 对于控件数组(Access 2007)?

更新时间:2023-12-06 11:58:46

我在表单中添加了一堆控件( Access 2007),子窗体,一系列文本框,下拉菜单,按钮...... 我创建了我的控件数组,只列出文本框,txtID,txtFName,txtLName,txtAddress,... 这些都在我的
控制数组中正确列出。 但后来又添加了一个文本框--txtTitle - 我需要在txtLName和txtAddress之间存在。 我在txtLName和txtAddress之间定位了txtTitle 并更改了txtTitle的tabInex,以便在txtLName之后和txtAddress之前跟随
。 问题是当我加载控件数组时(在Form_Load事件上) - 它仍然在数组的最后位置列出txtTitle。   Access 2007中是否有属性用于更改控件的序数
位置? 在Visual Studio中,我可以转到表单的设计代码部分并重新定位代码以在表单上创建控件 - 但显然无法在Access中执行此操作。 设计视图工具栏上是否有属性或某些功能,
会做这样的事情吗?
I added a bunch of controls to a form (Access 2007), a subform, a series of textboxes, dropdowns, buttons...  I created my control array to list only textboxes, txtID, txtFName, txtLName, txtAddress, ...  These all list properly in my control array.  But later I added one more textbox -- txtTitle -- which I need to exist between txtLName and txtAddress.  I positioned txtTitle  between txtLName and txtAddress and changed the tabInex of txtTitle to follow right after txtLName and before txtAddress.  The problem is that when I load the control array (on the Form_Load event) -- it still lists txtTitle in the last position of the array.   Is there a property in Access 2007 for changing the ordinal position of a control?  In Visual Studio I can go to a Form's Design code section and reposition the code to create a control on a form -- but obviously can't do that in Access.  Is there a property or some feature on the design view toolbar for doing something like this?