级联Combobox选择表 [英] Cascading Combobox to select table

查看:122
本文介绍了级联Combobox选择表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在设计我的第一个数据库,并试图弄清楚如何使用级联组合框从一个表中选择一个记录添加到另一个表中。 />

我正在考虑每年都有一系列表格,列出我们团队每年要检查的网站。然后我想在表单上使用组合框,以便用户可以在第一个框中选择一年,然后在第二个组合框中选择相应年份表中的一个站点。


这是可能的还是我需要改变数据库的结构?


谢谢

Crummie

解决方案

你想要的东西当然是可以实现的。


你的Db的结构是什么。你与桌子的关系完全展开的图像将是一个很大的帮助


菲尔


你可能会发现(70.7 KB,171 views) Access DB V2.jpg (48.9 KB,163 views)


Hi

I am designing my first database and are trying to figure out how to use a cascading combobox to select a record from one table to be added to another table.

I was looking at having a series of tables for each year listing the sites our team is to inspect for each year. I then wanted to use a combobox on a form so the user can select a year in the first box then in the second combobox to select a site from the corresponding years table.

Is this possible or do I need to alter the structure of the database?


Thanks
Crummie

解决方案

What you want is certainly achievable.

What is the structure of your Db. An image of your relationships with the tables fully expanded would be a great help

Phil


You may find Cascaded Form Filtering helpful.


Hi Phil

Thanks for your reply.


The image Access DB V1 is the structure and relationships I have where each inspection program had its own table (Tables within the red oval) and each year''s inspection targets for each program would have a separate table (Green oval). This is where I wanted to be able to choose a year from a dropbox then have another dropbox to select a program then based on those results have a third combobox to select the inspection premises from the relevant inspection targets table.


However over the weekend I thought that the structure in image Access DB V2 would probably simplify the process by having all the inspection records in 1 table (Red oval) and the list of inspection targets for each year as fields within an overall list (Green oval). Hopefully I''m on the right track in this thinking.

Either way I would like to have the data entry form to have the cascading boxes to select a inspection target. Hopefully this makes sense.

Any help would be greatly appreciated.
Crummie

Attached Images
(48.9 KB, 163 views)


这篇关于级联Combobox选择表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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