下拉框 [英] Dropdown Boxes
本文介绍了下拉框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的表单上有2个下拉框,两个都是从我为每个表格制作的。首先,我选择了我想要的服务,然后我希望服务类型仅限于只有服务ID与第一个框中的ID匹配的类型。我如何实现这个?
解决方案
我的表单上有2个下拉框,两个都从表I中拉出来为每个人制作。首先,我选择了我想要的服务,然后我希望服务类型仅限于只有服务ID与第一个框中的ID匹配的类型。我该如何实现?
在你的组合框的行源后面尝试这样的事情
展开 | / span> 选择 | 换行 | 行号
SELECT table.tblServiceType FROM table table.tblService HAVING(((table.tblService)= forms!frmMain!Combo24));
我想我改变了这一点。以下是我用于不同项目的名称:
表格是
tblService
tblServicetype
表格是
frmMain
组合框是
Combo24
这不是一个广泛的数据库,这不应该是难以做。当我修改你给我的东西时,我在服务类型框中什么都没有
这个概念叫做Cascading Comboboxes。这是一个相当不错的解释和示例代码:
http://www.mvps.org/access/forms/frm0028.htm
I have 2 dropdown boxes on my form, both which pull from table I made for each. First I select the Service that I want, then I want the Service Type to be limited to the types only with the Service ID that matches the ID from the first box. How do I implement this?
解决方案I have 2 dropdown boxes on my form, both which pull from table I made for each. First I select the Service that I want, then I want the Service Type to be limited to the types only with the Service ID that matches the ID from the first box. How do I implement this?Try something like this behind your combo box''s row source
Expand|Select|Wrap|Line Numbers
SELECT table.tblServiceType FROM table table.tblService HAVING (((table.tblService)=forms!frmMain!Combo24));
I think i changed this right. Here are the names I am using for the different items:
Tables are
tblService
tblServicetype
Form is
frmMain
Combo box is
Combo24
this is not an extensive database, this shouldnt be to hard to do. When I modified what you gave me, I have nothing in the Service type box
This concept is called Cascading Comboboxes. Here''s a fairly good explanation and example code:
http://www.mvps.org/access/forms/frm0028.htm
这篇关于下拉框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取
|
15天全站免登陆