问题描述
我有一个跟踪我们使命中的洗礼的数据库。每周来自不同地区的传教士提交本周进行的洗礼次数。在另一份传真上,他们后来报告了受洗者的姓名。我有一个查询,它总结了所报告的洗礼次数,并按[区域]和[月]分组。我有另一个查询,它计算按[区域]和[月]分组的名称数量。
现在,为了确保报告所有名称,我有第三个查询关联数据并显示Area,Month,SumofPaptisms和CountofNames。 (当然希望SumofBaptisms = CountofNames。)通过设置Join Properties,我能够显示正确的数据并检查是否存在差异。
只有一个问题。如果一个月内没有为某个区域提交的名称,则该查询在该月份没有显示该区域的记录,即使SumofBaptisms为5也是如此。即使表中没有名字,我怎样才能让它每月显示每个区域的记录?
我希望我的解释清楚。谢谢。
I have a database that tracks baptisms in our Mission. Every week Missionaries from different areas submit the number of baptisms performed that week. On a separate fax, they later report the names of those baptised. I have a query that sums the number of baptisms reported and is grouped by [area] and by [month]. I have another query that counts the number of names also grouped by [area] and by [month].
Now, to make sure that all of the names were reported, I have a third query that correlates the data and shows Area, Month, SumofBaptisms, and CountofNames. (Of course hopefully, SumofBaptisms = CountofNames.) By setting the Join Properties, I was able to get it to show the proper data and check for discrepancies.
There is only one problem. If there were no names submitted for an area one month, the query doesn?t show a record for that area that month, even if the SumofBaptisms is 5 for example. How can I get it to show a record for every area every month even if there are no Names in the table?
I hope my explanation is clear. Thanks.
推荐答案
我不确定我理解你的建议,我工作了几个小时,所以让我解释一下我有什么。
首先,在我的总和查询中我每个月都有一个记录,每个区域,它只是在Names查询中没有显示没有名字的记录。
所以我玩了一段时间的更新查询(我的第一次)。我创建了一个表,每个区域都有一个记录,每个月都有一个记录为0的洗礼次数。然后我做了一个更新查询,设置为将表字段更新为名称查询中字段的值(即[ qryNames]![月],[qryNames]![CountofNames],[qryNames]![Area]。)
我一直遇到错误消息操作必须使用可更新的查询。
是否有更简单的方法让我的原始查询显示所有SumofBaptisms记录并显示0或者Null没有相应的CountofBaptisms值?
感谢您的帮助。
PS,对不起双重帖子;我的浏览器冻结,我不认为第一个进入。
I''m not sure I understand your suggestion, I worked on it for a couple hours, so let me explain what I''ve got.
First of all, in my Sum Query I already have a record every month in every area, it''s just in the Names query that doesn''t show records where there are no names.
So I played around with update queries for a while (my first time). I made a table that has a record for every month in every area and the number of baptisms listed as 0. Then I made an update query that was set to update the table fields to the values from the fields in the Names Query (i.e. [qryNames]![Month], [qryNames]![CountofNames], [qryNames]![Area]. )
I kept running into the error message "Operation Must use an updateable query."
Is there an easier way to get my origional query to show all SumofBaptisms records and and show "0" or Null where there is no corresponding CountofBaptisms value?
Thanks for your help.
PS, Sorry for the double post; my browser froze and I didn''t think the first one made it in.
这篇关于关系问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!