在Microsoft Access中显示指定日期范围内的总数 [英] Displaying totals within a specified date range in Microsoft Access

查看:150
本文介绍了在Microsoft Access中显示指定日期范围内的总数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管我有使用SQL和使用PHP生成HTML报告的经验,但我还是Microsoft Access的初学者.

Although I have experience with SQL and generating HTML reports with PHP, I'm a relative beginner with Microsoft Access.

我目前正在使用Microsoft Access 2007连接到MSSQL Server 2005.

I'm currently using Microsoft Access 2007 to connect to MSSQL Server 2005.

我有一个报告"表,看起来像这样:

I have a table of Reports that looks something like this:

ReportID
DateCreated
Author
...

我想创建一个表单,允许用户指定开始日期和结束日期,然后将显示每个作者在指定日期范围内的报告数量.

I'd like to create a form that allows the user to specify a start date and an end date, which would then show the number of reports by each author within the specified date range.

我已经通过首先在组合框中检索唯一作者列表,然后允许用户选择作者,开始日期和结束日期,并在文本框中显示计数来完成此操作.但是,我想知道是否有一种更简便或更好的方法,或者是否有一种方法可以同时显示所有作者及其总数.

I've already done this in a form by first retrieving a list of unique authors into a combo box, and then allowing the user to select the author, start date, and end date, and displaying the count in a text box. However, I was wondering if there was an easier or better way, or if there was a way to display all of the authors and their totals simultaneously.

先谢谢您了:)

推荐答案

您可以将多个字段与组合框关联,因此首先让它们选择日期,然后使用author和total字段初始化组合框.

You can have multiple fields associated with a combobox, so first have them pick the dates, then initialize the combobox with both author and total field.

这篇关于在Microsoft Access中显示指定日期范围内的总数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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