查询/报告最近的日记帐分录 [英] Query/Report for most recent journal entry

查看:49
本文介绍了查询/报告最近的日记帐分录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!


我的办公室正在进行的项目有一个相当大的数据库。有一个表单用于输入有关每个项目的基本信息,此表单包含一个子表单,用于记录每个项目的日记帐分录。系统为每个项目分配一个随机自动编号,子窗体使用相同的自动编号将每个日记帐分录与正确的项目相关联。


子表单包含以下字段:Autonum,Date和Journal_Entry。一切都已正确关联,但当我尝试创建报告以显示每个项目的最新日记条目时,我遇到了一些问题。


主要问题:系统将显示正确的日期(日记帐分录的最近日期),但会显示错误的日记帐分录。期刊似乎按字母顺序排列。由于某种原因,日期与其相应日记帐分录之间的关联将丢失。关于如何解决此问题的任何想法?

Hello all!

I have a rather large database for ongoing projects at my office. There is a form that is used to enter basic information about each project, and this form contains a subform to record journal entries for each project. The system assigns a random autonumber to each project, and the subform uses the same autonumber to associated each journal entry with the correct project.

The subform conatins the following fields: Autonum, Date, and Journal_Entry. Everything has been associating properly, but when I try to create a report to show the most recent journal entry for each project, I have a few problems.

The main problem: the system will show the correct date(the most recent date a journal entry was made) but will show the wrong journal entry. The journals appear to end up in alphabetical order. For some reason, the association between the date and its respective journal entry is lost. Any thoughts on how to fix this?

推荐答案

对不起,我还要提一下,我一直在使用组/排序功能将最新日期放在最前面报告。
Sorry, I should also mention that I have been using the Group/sort feature to put the most recent date on top in the report.


可能存在如何定义数据库中的关系(功能区,数据库工具,关系)的问题。


有关表和它们的字段会很有帮助:

There might be an issue in how the relationships in the DB have been defined (ribbon, database tools, relationships).

Would be helpful to have the tables and their fields:

展开 | 选择 | Wrap | 行号


我不允许向您展示实际表格,如i其中包含的信息是高度机密的。我为此道歉,但我可以为您提供进程内项目查询的SQL:


(非常大的IIf语句用于查询的另一部分工作正常。再次抱歉,如果它令人困惑)

I am not allowed to show you the actual tables, as the information contained in them is highly confidential. I apologize for that, but I can give you the SQL for the In-Process Project query:

(The very large IIf statement is for another part of the query that works fine. Again, sorry if it is confusing)

展开 | 选择 | Wrap | 行号


这篇关于查询/报告最近的日记帐分录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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