DCount using Where Clause

marnieg

Registered User.
Local time
Today, 12:02
Joined
Jul 21, 2009
Messages
70
I have a Dcount statement where I want to return a value based on a Select criteria of finding if the value they entered on the form is found between two fields in the database. Is there a "Between" method that can be used on a DCount. Here is my code now but it doesn't give me what I want.

intLowRange = DCount("bau_auto", "BallotUsage", "bau_low <= " & Me![low] & " And bau_high >= " & Me![low] & "")

What I want to know is does the value they entered in the Me![low] field exist on any records in the BallotUsage table between the values of bau_low and bau_high?

I know my boolean logic here is wrong so maybe I should be using a differen lookup.

Thanks for any suggestions.
 
The statement I submitted was correct. I was not viewing my data correctly in a test query to validate I was getting the correct coun.t
 

Users who are viewing this thread

Back
Top Bottom