Guest COLDGEORGE Posted October 8, 2009 Report Share Posted October 8, 2009 Hi all, I'm working on a query to get a sum of entries of certain item in a determined period of time, for instance, how many pens were received in October and I'm using this code:Data1.RecordSource = "select sum(quantity) as totalentries from mientries where itemid = " & Text1.Text & " and date between #" & DTPicker1.Value & "# and #" & DTPicker2.Value & "# " the thing is that is not working as I wish, because I get the total of entries, instead of the total for the period of time. Any suggestion will be greatly appreciated, Coldgeorge. Link to comment Share on other sites More sharing options...
justsomeguy Posted October 8, 2009 Report Share Posted October 8, 2009 Print out the query to see what it is, make sure all of the variables you're adding to the query have the correct values. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now