Problem with query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manoj9849967222
    New Member
    • Jul 2007
    • 48

    Problem with query

    Hi All

    I have a problem with query.

    I have designed a simple query which sould give me itemwise total qty sales during a given period.

    the fields in the query are
    startdate, modelno,model,q ty.

    I have also designed a form where the user will give the period for example 1/1/2007 to 1/10/2007

    My query looks like this..

    SELECT Outwardmaster.s tartdate, Outwardmaster.M odelno, Outwardmaster.M odel, Sum(Outwardmast er.Qty) AS SumOfQty
    FROM Outwardmaster
    GROUP BY Outwardmaster.s tartdate, Outwardmaster.M odelno, Outwardmaster.M odel
    HAVING (((Outwardmaste r.startdate) Between [forms]![ICproductreport]![txtstartdate] And [forms]![ICproductreport]![txtenddate]));

    but now when i run the query it doesnot gives me itemwise total qty sales during a given period.

    Please suggest if there are any mistake in my query.


    Regards
    Manoj
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    Hmm, looks to me you're using European dates and the query requires the mm/dd/yyyy US date format.
    The easiest solution is to change the form date field's format into a date with month description (see options when selecting the dateformat in the properties window when you have the form in designmode).
    Your formdate will look like: 1-nov-2007

    Nic;o)

    Comment

    • manoj9849967222
      New Member
      • Jul 2007
      • 48

      #3
      Hi Nico

      I am using the US date format only i.e mm/dd/yy. I have tried using your format also. still i am not able to come out of this.

      Regards
      Manoj

      Comment

      Working...