如何使用组合框中选择的值来更新报表中的多个记录? [英] How to use the value selected in a combobox to update multiple records in a report?

查看:65
本文介绍了如何使用组合框中选择的值来更新报表中的多个记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我有一个Access 2007报告,用户从组合框中选择一个日期。选择日期后,我需要组合框的AfterUpdate()事件来填充该月的计算总数的文本字段。

我的组合框名为SelectYearMonth。并且由字段YEARMONTH填充。在我的数据库中。我有这个部分工作得很好。


报告按YEARMONTH分组。然后通过JOBTYPE


字段JOBTYPE由字段JOBTYPE填充。在数据库中。 JOBTYPE是指JOBTYPE。出现在JOBTYPE中报告的标题。我也有这个部分工作得很好。


这是我遇到问题的地方:每个JOBTYPE有一个PAGES与之关联的数值。在JOBTYPE中页脚,我需要计算PAGES的总数。对于JOBTYPE通过YEARMONTH那就是SelectYearMonth。


有谁能帮我解决一下我需要的计算?


非常感谢任何帮助!


-Diana

Hi All,

I have an Access 2007 report where the user selects a date from a combo box. After selecting the date, I need the AfterUpdate() event of the combo box to fill in text fields with a calculated total for that month.

My combo box is named "SelectYearMonth" and is populated by the field "YEARMONTH" in my database. I have this part working great.

The report is grouped by "YEARMONTH" and then by "JOBTYPE"

The field "JOBTYPE" is populated by the field "JOBTYPE" in the database. The "JOBTYPE" appears in the "JOBTYPE" header of the report. I also have this part working great.

Here is where I run into problems: Each "JOBTYPE" has a "PAGES" numeric value associated with it. In the "JOBTYPE" footer, I need to calculate the total number of "PAGES" for the "JOBTYPE" by the "YEARMONTH" that is the "SelectYearMonth".

Can anyone please help me with the calculation I need?

Any help is greatly appreciated!

-Diana

推荐答案

表格上没有组合框等,你不会更新查询那将针对数据库运行,然后使用修改后的查询或过滤器运行报告?


我没有Acc2007,但这似乎是涉及的过程..
Isn''t the combobox etc on a form, and wouldn''t you update a query that would run against the database and then run the report using the revised query or a filter?

I don''t have Acc2007, but that would seem to be the process involved..


这是一个与你的上一篇文章


嗨gnawoncents,


是的,这是一个不同的报告比我以前的帖子。它比其他报告更详细一些。


我仍​​然无法确定这个后续更新代码的正确语法。我以前的帖子没有涉及多个群体。没有JOBTYPE组。这是本月所有页面的直接计算,而不是本月所有类型的页面。


我试图操纵你给我的每月总计算量来分解它由JOBTYPE组成的组但是,我没有取得任何成功。


非常感谢任何帮助。


谢谢,

戴安娜
Hi gnawoncents,

Yes, this is a different report than my previous post. It goes into a little bit more detail than the other report.

I am still having trouble figuring out the proper syntax for the afterupdate code for this one. My previous post didn''t have to deal with multiple groups. There was no "JOBTYPE" group. It was a straight forward calculation of all pages for the month, not all pages by type for the month.

I tried manipulating the calculation you gave me for the monthly total to break it down by the group "JOBTYPE" but, I am not having any success with it.

Any help is super appreciated.

Thanks,
Diana


这篇关于如何使用组合框中选择的值来更新报表中的多个记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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