不同项目的具体设备清单 [英] specific equipment list for different projects

查看:113
本文介绍了不同项目的具体设备清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在创建一个设备数据库并且遇到了一些创建它的问题。这是一个面向工程的数据库

MS Access 2010

这是我希望它如何发展的基本概念。
设计:


- 用户进入主菜单,他们可以选择创建新项目,或者选择现有项目并查看/打印/编辑该项目中的信息 - 我是我创建了一个按钮,通向一个表格,我可以创建一个新的,所有剩下的(我相信)只是让这个工作完美


- 一旦用户选择了项目(用于选择项目的组合框,然后按下按钮进入下一步)将出现一个页面,该页面将仅显示所选项目的所有项目信息。在这个页面上,我希望有另一个按钮,它将导致一个设备列表。这仅适用于此项目。最终用户应该能够添加/编辑/删除数据,搜索数据等(数据库应具有的所有常规功能)


问题:


- 当用户选择了他的项目并且现在链接到下一个表单时,我希望有一个设备列表。按钮,指向设备列表。我从excel导入了一个设备列表并创建了一个表单等。我将如何为该设备列表专门为这个项目填充它?
示例:我选择项目编号S111,然后单击设备列表,这将导致拆分表单,我可以填充设备列表。但后来我想回到主菜单并选择项目编号S888,然后继续填充该项目的设备清单。但是,此设备列表中的数据仅与此项目编号隔离。


我是否需要为每个项目创建单独的表格或者是否有一些简单的方法?...很抱歉很难解释这一个


让我知道您是否需要更多信息或概述


谢谢

Hi there,
I''m creating an equipment database and have ran into some problems creating it. This is an Engineering oriented Database
MS Access 2010
Here is the basic idea of how I want it to pan out.
Design:

- Users enter a main menu where they have the option of creating a new project, or selecting an existing project and viewing/printing/editing information in that project - I''ve created the button that leads to a form where I can create a new, all is left (I believe) is just making this work perfectly

- Once the user has selected the project (combo box to select project and press button to go next) A page shall appear that will display ALL Project information for ONLY the specific project that was chosen. On this page I want there to be another button that will lead to an "equipment list" which is specific for this project only. Eventually the user should be able to add/edit/delete data, search for data etc (all the normal functions that a database should have)


Question:

- When the user has selected his project and is now linked to this next form, I want there to be an "Equipment list" button which leads to an equipment list. I have imported an equipment list from excel and created a form etc. How will I be able to make it for that equipment list to be populated specifically for just that one project?
example: I select project number S111 and then click on an equipment list which will lead to a split form where I can populate the equipment list. But then I want to go back to main menu and select project number S888 and then go on to populate the equipment list for that project. However the data in this equipment list is isolated just to this project number.

Will I need to create separate tables per project or is there some simple method?.. sorry hard to explain this one

let me know if you need any more info or overview

Thanks

推荐答案

听起来您可能需要研究数据库规范化。不,你不想为每个项目都有一个单独的表。您需要一个单独的表来列出您的设备列表信息。该表将有一个字段(称为外键),它将链接到您的项目表,以便您知道每个项目需要哪个设备。如果您有多个项目使用相同设备的时间,则必须为这种多对多关系创建连接表。设置完表格后,只需在打开设备列表表单时提供过滤器,就可以只选择当前选定的项目。如果您需要能够将设备添加到列表中,则需要更多参与。
It sounds like you might need to look into Database Normalization. No you wouldn''t want to have a separate table for each project. You would want a separate table for your equipment list information. This table would have a field (called a foreign key) that would link to your projects table so that you would know which piece of equipment is needed for each project. If you have times where you have the same piece of equipment being used for multiple projects, then you would have to create a join table for this many-to-many relationship. Once you have your tables setup, then you would just provide the filter when you open your equipment list form to be just the currently selected project. If you need to be able to add equipment to the list, then there is a little more involved.


是的,我需要能够根据用户需要将设备添加到此列表中。有时候所有信息都不会立即可用,计算也会改变等。如果是这样的话,我该如何去做?

谢谢Seth
Yeah I would need to be capable of adding equipment to this list as the user needs. Sometimes all the information wouldn''t be available immediately and calculations would change etc. How would I go about doing it if that''s the case?
Thanks Seth


我通常如何使用您的设备表单的OpenArgs属性将项目ID的值从项目表单传递到设备表单。然后我在设备表单上有一个绑定到外键字段的隐藏文本框,我使用表单的'OnLoad事件将此文本框的默认值属性设置为OpenArgs属性中的内容。然后,当我添加设备时,它会获得正确的外键值。
How I normally do it would be to use your equipment form''s OpenArgs property to pass the value of the project ID from the projects form to the equipment form. I then have a hidden textbox on the equipment form that is bound to the foreign key field and I use the form''s OnLoad event to set this textbox''s Default Value property to what is in the OpenArgs property. Then, when I add equipment it gets the proper foreign key value.


这篇关于不同项目的具体设备清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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