Solved

Combination criteria for unbound field on a report

Posted on 2015-01-19
5
162 Views
Last Modified: 2015-01-19
What is wrong with this syntax?

= DCount("[AwardedClient]", "tblClientGeneral", "[AwardedClient]= True") AND "[AwardedDate]" = Between Forms!frmSelectDateRange.txtStart and Forms!frmSelectDateRange.txtEnd

I'm trying to count the number of Trues in a table within a date range specified on an open form.

--Steve
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 50

Expert Comment

by:Gustav Brock
ID: 40558566
It should be something like this:

=DCount("[AwardedClient]", "tblClientGeneral", "[AwardedClient]= True And [AwardedDate] Between DateValue(" & Forms!frmSelectDateRange.txtStart & ") And DateValue(" & Forms!frmSelectDateRange.txtEnd & ")")

/gustav
0
 
LVL 24

Assisted Solution

by:Phillip Burton
Phillip Burton earned 250 total points
ID: 40558568
= DCount("[AwardedClient]", "tblClientGeneral", "[AwardedClient]= True AND [AwardedDate] Between " & Forms!frmSelectDateRange.txtStart & " and " & Forms!frmSelectDateRange.txtEnd)

Assuming that the dates are in date format. May need #s around the dates as well, as in #01/02/2014#
0
 

Author Comment

by:SteveL13
ID: 40558605
I have to change this and will issue a new request if needed.  The form is NOT going to be open so I have to use the report criteria something like:  (which is not working)

=DCount("[AwardedClient]", "tblClientGeneral", "[AwardedClient]= True And [AwardedDate] Between DateValue(" & Reports!rptImportAnalytics.txtWeekstartingdate & ") And DateValue(" & Reports!rptImportAnalytics.txtWeekstartingdate & ")+7")
0
 
LVL 50

Accepted Solution

by:
Gustav Brock earned 250 total points
ID: 40558648
Question is if the fields holds a value. Try first:

=DateValue(" & Reports!rptImportAnalytics.txtWeekstartingdate & ")

or simply:

=DateValue([txtWeekstartingdate])

/gustav
0
 

Author Closing Comment

by:SteveL13
ID: 40558657
Awarded to both of you because I changed the rules mid-stream.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ACESS 2010 Query Criteria 23 55
Menus 6 55
Unable to reference a control field in a subform 9 20
Multiple tables for a tabbed form 2 32
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question