General discussion

  • Creator
    Topic
  • #2306687

    Expression Building in Access 2000

    Locked

    by d_e_pinder ·

    What is the expression for to isolate dates within a table and maintain subsequent fields in order to total figures for a month on one i/d.
    id=1
    Date 1=01/01/03 Price 1=?1
    Date 2=02/01/03 Price 2=?2
    Date 3=01/02/03 Price 3=?2
    Total Jan=Expression?

All Comments

  • Author
    Replies
    • #3533313

      Expression Building in Access 2000

      by eschlangen ·

      In reply to Expression Building in Access 2000

      IF I understand your question correctly, and I’m not sure that I do, you are looking for a query that will give you the total price for January for ID 1. I’m assuming that your table structure is more like this:

      ID DATE PRICE(?)
      1 01/01/03 1
      1 02/01/03 2
      1 01/02/03 2

      If this is correct, the query would read like this:

      SELECT SUM(PRICE) FROM TableName WHERE ID = 1 AND MONTH(DATE) = 1;

      If you switch to SQL view, type this in and then change back to grid view, itwill be easier to see but it’s hard to show here. Hope this helps!

    • #3356024

      Expression Building in Access 2000

      by d_e_pinder ·

      In reply to Expression Building in Access 2000

      I am looking for an expression that will total all of the prices for a particular month for that id number.

    • #3530546

      Expression Building in Access 2000

      by eschlangen ·

      In reply to Expression Building in Access 2000

      My query DOES give a total of the prices for a given ID for a given month. You must not be stating your problem correctly.

    • #3530451

      Expression Building in Access 2000

      by d_e_pinder ·

      In reply to Expression Building in Access 2000

      It is probably not the question or the answer, but the way I’ve established the fields within the table. Your answer has given me the direction,I think, that I need to take to achieve the aim. If I need to resubmit the question it would be nice to be able to paste an example of the table in so that i can be advised on the best method to achieve the total
      Thanks.

Viewing 3 reply threads