I'm working in Access 2003 and most likely have another stupid question to ask! I have the following code:
It works perfect and returns the number of calls that were logged on Feb 1 from 8-9.
How can I change the code so that I am able to change just the month by entering it into a textbox on the same form called txtMonth?
For example, when I enter 5 into txtMonth, the above code would now have 5 in place of the 2 for the month. I can't seem to get it right no matter how I try it!
Here was one of my unskilled attempts:
I know that attempt is hard to look at! That's why my user name is "WannabePrgmr"! !!
Any help is greatly appreciated!
Code:
Me.Text8 = DCount("[Call Log]", "[CALLTOTALQuery]", "[ChangedDate] BETWEEN #2/1/2010 8:00:00 AM# AND #2/1/2010 9:00:00 AM#")
How can I change the code so that I am able to change just the month by entering it into a textbox on the same form called txtMonth?
For example, when I enter 5 into txtMonth, the above code would now have 5 in place of the 2 for the month. I can't seem to get it right no matter how I try it!
Here was one of my unskilled attempts:
Code:
Me.Text8 = DCount("[CallLog]", "[CALLTOTALQuery]", "[ChangedDate] BETWEEN #(Me.[txtMonth])/1/2010 8:00:00 AM# AND #(Me.[txtMonth])/1/2010 9:00:00 AM#")
Any help is greatly appreciated!
Comment