控制标签Possibllities [英] Control Tab Possibllities

查看:92
本文介绍了控制标签Possibllities的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好:


我有一些我想做的事情,我想知道标签控件是否是实现它的最佳途径。


我有5类材料类型。我从列出了类别的Excel工作表创建了应用程序。我的老板希望我的表格尽可能接近excel表格。他希望每种材料分别按材料类型输入,这当前不是我设置的方式。目前,您为所有材料类型选择相同形式的matType和材质。我想出了使用标签的想法。我在选项卡顶部有一个未绑定的文本框,让用户选择matType。我的想法是,基于所选择的matType,连续子表单将填充与该matType相关的记录,此外还允许用户为该matType添加数据。最初我认为我可以有一个表单并且基于matType加载数据,但是,我从来没有能够使用一个表单来实现它。我现在有一个表示我所有类别的表单,并且表单的'记录源的查询被子表单所代表的matType过滤。以下是matType1的查询内容:

Hello:

I have something I would like to do and I was wondering if tab controls was the best route to accomplish it.

I have 5 categories of material types. I created the application from an excel sheet that had the categories listed. My boss would like my form to be as close as possible to the excel sheet. He would like for each material to be input by material type separately, which is currently not how I have it set up. currently, you select the matType and material in the same form, for all material types. I came up with the idea to use the tabs. I had an unbound text box at the top of the tab to have the user select the matType. My idea was that based on the matType selected, the continuous subform would populate with records related to that matType, in addition allow user to add data for that matType. Initially I thought I could have one form and have the data load based on the matType, however, I never was able to make it happen using one form. I now have a form representing all of my categories and the query that is the form''s record source is filtered by the matType that the subform represents. Here is what a query for matType1 looks like:

展开 | 选择 | Wrap | 行号

推荐答案

有一件事你可以做的就是设置


Tabctl1.Pages(x).Visible = False


除了一页以外的所有页面。然后它会显示该页面!
One thing you can do is set

Tabctl1.Pages(x).Visible = False

for all but one page. Then it will show that page!


Hi Chip,


''''表示页面名称或索引?我试过了两个,不幸的是,我无法让它工作。


唯一应该显示的是水泥


这是我试图使用索引名称的地方

Hi Chip,

the ''x'' represents the page name or index? I tried both and unfortunately, I can''t get it to work.

The only one that should show up is called Cement

Here is where I tried to use the name of the index

展开 | 选择 | Wrap | 行号


是的,我指的是数字索引,从零开始,就像你的第一个代码一样。你也应该能够使用.Pages(" pageName"),但我还没有测试过。


如果TabCtl1不是一个有效的控件,你会去无论是在编译时还是在运行Current()事件时都会收到错误信息。您可能希望使用命令按钮中的某些代码进行测试,您可以单击该代码来运行。
Yes, I was referring to the numerical index, starting at zero, like your first code. You should also be able to use .Pages("pageName"), but I haven''t tested that.

If TabCtl1 is not a valid control, you''re going to get an error telling you such, either when you compile, or the Current() event runs. You might want to test with some code in a command button that you can click to run.


这篇关于控制标签Possibllities的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆