display number of records on form from date range

Joined
Feb 15, 2010
Messages
3
Reaction score
0
Hello im trying to get and display how many records there are in my table that fall between todays date and 10 days from todays date on a form text box but I get some error of course

heres what I have
Code:
 StartDate = today
  	EndDate = DateAdd("d", 10, Date)
  
    intStore = DCount("[ID]", "[contacts]", "[call Back Date] >=Date() AND [Call Back date] <=  EndDate")

and that always gives me error 2766 The object doesnt contain the Automation object 'EndDate.'

if i get rid of the enddate part it works fine but of course gives everyyyyything greater then todays date and i just want records that match today through 10 days from now

Edit: Oh Id also like to know how to do somthing if no records were found matching the 10 days like if null blah else show total number of records found matching those days

TIA
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top