Microsoft Access z-index属性 [英] Microsoft Access z-index property
问题描述
我有一个包含列表框的表单.我正在尝试更改列表框的顺序.我试过前台或发回,但它们在表单视图中不起作用.我发现z索引属性用于安排它们的优先级.但是,以下代码不起作用.这是正确的方法吗?还是有其他方式(带有或不带有代码)来做到这一点?
I have a form including listboxes. I'm trying to change order of listboxes. I tried bring front or send back but they are not working in form view. I found z index property for arranging their priority. However, following codes are not working. Is this correct way to do it? Or is there any other way with or without codes to do this?
Me.Controls.SetChildIndex (Me.List0 , Me.List1)
感谢您的帮助.
推荐答案
docmd.RunCommand acCmdDesignView
forms("form1").Controls("text0").inselection=true
docmd.runcommand acCmdSendToBack '(or docmd.runcommand acCmdBringToFront)
docmd.RunCommand acCmdFormView
此外,Access 2016仍然不支持ZOrder.因此,我还没有学会编写单行代码以将控件置于其他两个之间的方法,我只是将中间部分发送回去,然后将背对背,并将其扩展到许多控件必须重叠的地方.
Also, ZOrder is still not supported by Access 2016. As such, I have not yet learned a way to write a single line of code that puts a control in between two others, I just send the middle to back and then the back to back, and expand this to however many controls have to overlap.
最后,即使您将VBA用于ZOrder
,您的英语听起来也像forms("form1").Controls("text0").TabIndex=34
那样模棱两可,正如Olek所建议的那样,它也很简单.
And last, even though you use the VBA for ZOrder
, your English does ambiguously sound like forms("form1").Controls("text0").TabIndex=34
, which as Olek suggested, is also quite simple.
这篇关于Microsoft Access z-index属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!