Guest COLDGEORGE Posted October 8, 2009 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 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
Archived
This topic is now archived and is closed to further replies.