Hey everyone, I am a complete newb when it comes to programming and Access so bear with me. I developwed an application in Access 2007 to track tickets written for problems with our hardware (issue tracker). I want to count the number of tickets on and/or prior to a date entered in a text box. Here's what I got so far:
Where txtTotal is another text box on the form to display the answer.
This code is executed by command button and when this function is ran it returns a completely wrong number.
Other pieces of information: Entries to the "TicketDate " column in tblTickets is formatted using the Now() function which, as you all know, returns not only the date but the time as well.
I am thinking that their needs to be some of conversion so that I get the correct number from this expression.
If anyone could shed some light on this, it would be greatly appreciated
Code:
Dim enterdate As Date
enterdate = txtDate.Value
txtTotal.Value = DCount("*", "tblTickets", "[TicketDate] <=" & "#" & enterdate & "#")
This code is executed by command button and when this function is ran it returns a completely wrong number.
Other pieces of information: Entries to the "TicketDate " column in tblTickets is formatted using the Now() function which, as you all know, returns not only the date but the time as well.
I am thinking that their needs to be some of conversion so that I get the correct number from this expression.
If anyone could shed some light on this, it would be greatly appreciated
Comment