寻找像“子表”之类的东西。 [英] Looking for something like a "Sub-Table"

查看:67
本文介绍了寻找像“子表”之类的东西。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我正在研究一个新的数据库系统,以生成工作技术人员正在做的报告以及他们的整体通过率/失败率。我有大部分数据库设置和工作。但是,我有一些从表格生成的报告(由生成表格查询生成)


现在,有没有办法像表格那样做同样的事情。制作表格查询使用类似子表的表格,或者在我用来过滤来自一个主数据库的信息的表格背景中运行的表格。


我有像ID这样的字段,日期,总体,技术,描述,失败,修复>


此外,我不喜欢制表查询的一件事。当它使用表单按钮运行时,我必须打开查询,关闭查询,然后它询问我是否要删除上一个表。我已经设置了一个宏来绕过所有这些,但必须有更好的方法。


我正在使用Access 2000.

解决方案

另外,我有一个关于数据库的一般问题。我只使用它们大约一个月没有使用它们的经验,只是一些整体知识和一些实验。


对我来说这是一个好主意我的主数据库几乎完全是数字......其中像Model这样的列将填充像00034这样的数字,但是当我运行报告时,如何让报告显示模型名称而不是数字。我已经想出了Pass / Fail(IIF [field] = - 1,Pass,Fail),这是在查询和报告期间运行的。但是,我不确定这是不是一个好主意。


为什么使用生成表查询?

只需更改生成表查询改为SELECT查询并使用它。


只有当创建需要花费大量时间并且数据用于多个报表时,我们才会使用临时表。


当需要临时表时,首先用这个SQL创建一个查询:

DROP TABLE< your" create-table" name> ;;


在激活make-table查询之前运行此命令。在按钮后面重复当前语句并添加删除表。查询。


最后,使用IIF()语句是可以的。您甚至可以缩短为:

IIF([Field],True,False)


Nic; o)


大家好,我正在开发一个新的数据库系统来生成工作技术人员正在做的报告以及他们的整体通过率/失败率是。我有大部分数据库设置和工作。但是,我有一些从表格生成的报告(由生成表格查询生成)


现在,有没有办法像表格那样做同样的事情。制作表格查询使用类似子表的表格,或者在我用来过滤来自一个主数据库的信息的表格背景中运行的表格。


我有像ID这样的字段,日期,总体,技术,描述,失败,修复>


此外,我不喜欢制表查询的一件事。当它使用表单按钮运行时,我必须打开查询,关闭查询,然后它询问我是否要删除上一个表。我已经设置了一个宏来绕过所有这些,但必须有更好的方法。


我正在使用Access 2000.



''为了消除Make Table Query所涉及的提示(即之前创建的表),您可以使用以下代码片段

展开 | 选择 | Wrap | 行号< /跨度>

Hey everyone, I''m working on a new database system to generate reports on the work technicians are doing and what their overall Pass/Fail rate is. I have the majority of the database set up and working. However, I have a couple reports that are generated from a table (which is generated by a Make Table Query)

Now, is there a way to do the same thing as a "Make Table Query" with something like a sub-table, or a table that would run in the background of the form I use to filter the information from one main database.

I have fields like "ID, Date, Overall, Tech, Description, Failure, Fix"

Also, the one thing I don''t like about the "Make Table Query" is when it is ran with a form button, I have to open the query, close the query, and then it asks if I want to delete the previous table. I''ve set up a macro to bypass all of that, but there must be a better way.

I am using Access 2000.

解决方案

Also, I have a general question about databases. I''ve only been using them for about a month with no prior experience using them, just some overall knowledge and a bit of experimentation.

Is it a good idea for me to have my main database be filled with almost entirely numbers... where a column like Model would be filled with a number like 00034, but when I ran a report how would I make the report show up the model name instead of the number. I''ve figured that out for Pass/Fail (IIF[field]=-1,"Pass","Fail") and this is ran during queries and reports. However, I am unsure if this is a good idea or not.


Why do you use a make-table query ?
Just change the make-table query into a SELECT query and use that instead.

Only when the creation takes a lot of time and when the data is used for multiple reports we revert to using a temp table.

When the temp table is needed first create a query with this SQL:

DROP TABLE <your "create-table" name>;

Run this before activating the make-table query. Behind your button repeat the present statement and add the "drop table" query.

Finally, it''s OK to use an IIF() statement. Yours can even be shortened into:
IIF([Field],"True","False")

Nic;o)


Hey everyone, I''m working on a new database system to generate reports on the work technicians are doing and what their overall Pass/Fail rate is. I have the majority of the database set up and working. However, I have a couple reports that are generated from a table (which is generated by a Make Table Query)

Now, is there a way to do the same thing as a "Make Table Query" with something like a sub-table, or a table that would run in the background of the form I use to filter the information from one main database.

I have fields like "ID, Date, Overall, Tech, Description, Failure, Fix"

Also, the one thing I don''t like about the "Make Table Query" is when it is ran with a form button, I have to open the query, close the query, and then it asks if I want to delete the previous table. I''ve set up a macro to bypass all of that, but there must be a better way.

I am using Access 2000.

''To eliminate the Prompts involved with a Make Table Query (i.e. the previously created Table), you can use the following code snippet

Expand|Select|Wrap|Line Numbers


这篇关于寻找像“子表”之类的东西。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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