获取 Microsoft Access 报告中两个计数之间的差异
我有一份报告,其中列出了两个字段,即约会和缺勤。现在我想要的是在构建报告后,我想得到这两个计数之间的差异。这可能吗?
谢谢!
I have a report which lists 2 fields namely appointments and absences. Now what I want is that after building the report, I want to get the difference between these 2 counts. Is that possible?
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的报表上有两个字段:约会和缺勤,并且它们的名称相同,请创建一个未绑定的控件并将其 ControlSource 指定为:
现在,我真的不建议使用它,因为控件和它们必然具有相同名称的字段。我将绑定到 Appointments 的控件重命名为
txtAppointments
,将绑定到 Absences 的控件重命名为txtAbsences
,然后计算将是[txtAppointments]-[ txt缺席]
。现在,请记住,这假设这两个字段都不为空。如果是,您可能想要这个:
尝试看看它是否有效!
If your report has two fields on it, Appointments and Absences, and they are named the same, create an unbound control and assign its ControlSource to be this:
Now, I wouldn't really recommend using that, since it's likely that the controls and the fields they are bound to have the same name. I'd rename the control that is bound to Appointments as
txtAppointments
and the one bound to Absences astxtAbsences
, and the calculation would then be[txtAppointments]-[txtAbsences]
.Now, keep in mind that this assumes that neither field is ever Null. If it is, you probably want this, instead:
Try and see if it works!