如何构建访问数据库 [英] How to structure an access database

查看:72
本文介绍了如何构建访问数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表格中的组合框(专业化


我有来自表格的报告(经理


组合框名称是( combo1


组合框中的选项是

managersjob

governorsjob

presedentsjob

employeesjob


我要打开的报告是

mj

gj

pj

ej


现在我想要从组合框中选择managersjob然后打开报告mj,当我选择governorsjob时,报告gj打开等等

代码是什么?并记得我想从同一个数据库中的不同表中打开r的combox和报告,所以任何人都有答案吗?

i have a combobox from table( specialization)

and i have a reports from table (managers)

the combobox name is( combo1)

the selections in the combo box are
managersjob
governorsjob
presedentsjob
employeesjob

the reports i want to open are
mj
gj
pj
ej

now i want to select managersjob from the combobox then the report mj open and when i select governorsjob the report gj opens and so on
what is the code? and remeber that the combox and the reports i want to open r from adifferent tables in the same db, so any one has an answer?

推荐答案

嗯,你需要首先决定数据的连接方式。计算机程序在发布时无法询问程序员。逻辑需要首先在那里。你没有告诉我们这个逻辑是什么(或者它是如何保存在你的数据库中的)。


显然,你可以在你的ComboBox中有多个列,并访问那些在你的代码中。您需要首先将正确的相关数据放入您的ComboBox中。
Well, you need to decide first of all how the data is connected. Computer programs are not going to be able to ask the programmer when it''s released. The logic needs to be there in the first place. You haven''t told us what that logic is (or how it''s held in your database).

Clearly, you can have multiple columns in your ComboBox, and access those in your code. You need to get the correct, related, data into your ComboBox in the first place though.


@NeoPa


好​​吧我没有不要理解所说的所有内容,但我想说在这个数据库中我有3个表格,它们之间的关系是一对多访问。我的组合框中只有一列,它的名字是(职业

所以你的意思是什么逻辑,你的组合框中正确的相关数据是什么意思?我需要acode把它放在组合框中。所以当我从我之前提到的选择中选择任何选择之前它打开像我之前所说的特定报告。谢谢你的回复XD
@NeoPa
okay i didn''t quiet understand all what u said but i want to say that in this db i have 3 tables and the relationship between them is one to many in access. and i have only one column in my combobox itis name is (career)
so what logic do u mean and what do u mean by the correct related data in my combobox? i need acode to put it in the combobox .so that when i select any selection from the selections i mentioned before it open aspecific report like i said before. and thank u for ur reply XD


ManagersJob匹配MJ。我们知道这是因为你已发布了它。


这些信息(相关性)存储在数据库中的哪个位置?如果没有任何东西可以连接它们,那么你怎么能期望它能够编程呢?它无法在网页上看到它。


目前Combo1是如何设置的?它从哪里获取数据?
ManagersJob matches MJ. We know this because you''ve posted it.

Where is this information (correlation) stored in your database? If there is nothing to connect them, then how can you expect to be able to program it in? It can''t look on the web page for it.

How is Combo1 set up at the moment? Where does it get the data from?


这篇关于如何构建访问数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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