Recent content by pleasehelp

  1. P

    Subtracting rows in access help please.

    @CJ_London how do I change the field type of my year? is that in right-click properties? SELECT Invoice.Year, Sum([Invoice]![Price]*[Invoice]![Quantity]) AS Sales FROM Invoice GROUP BY Invoice.Year; SELECT DISTINCT Year, (SELECT Sum([Quantity]*[Price]) FROM Invoice as tmp WHERE...
  2. P

    Subtracting rows in access help please.

    @Geotch that seems to work, but my only problem is that I don't have a table with the sales in it, I had to create a function to find it within the query where I need the "change in sales" and the years do not go with the sales because it is an invoice table. I appreciate the help, but would you...
  3. P

    Subtracting rows in access help please.

    I believe that it is a number field and I am really bad at access and have been trying different things from other posts hoping that they would work. Plus QryPrev.Sales doesn't register as the previous sales row from Qry.Sales so im sure I messed that up too @geotch @cj_london
  4. P

    Subtracting rows in access help please.

    SELECT Invoice.Year, Sum([Invoice]![Quantity]*[Invoice]![Price]) AS Sales FROM Invoice GROUP BY Invoice.Year; (Select Qry.Year, Qry.Sales, Qry.Sale AS [Current] QryPrev.Sales AS Previous, [Qry]![Sales]-[QryPrev]![Sales] AS [Change in Sales] FROM Qry INNER JOIN Qry AS QryPrev WHERE...
  5. P

    Subtracting rows in access help please.

    @spikepl thank you for the link, but I knew about subquerys, but I do not know to refer to the previous number in the row when im using it. I have tried to use sample subquery SQL statements and edit them to fit my query, but it is to no avail. this is my last resort, I would rather figure it...
  6. P

    Subtracting rows in access help please.

    QRY Year Sales 2005 $11,185,566.49 2006 $13,479,594.55 2007 $15,969,007.83 2008 $15,880,317.72 2009 so on 2010 so on 2011 so on this is a picture of it. I would like the change in sales from the previous year to be right next to the sales column. This is the SQL if you...
  7. P

    Subtracting rows in access help please.

    I have a query with years and sales column. I need to make a column that displays the difference in sales between years. My query is named "Qry" if that is needed. "Year" and "Sales" are the column titles if you need that for the SQL. Please help me out
Back
Top Bottom