General discussion

Locked

Expression Building in Access 2000

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?

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Expression Building in Access 2000

by ESchlangen In reply to Expression Building in Ac ...

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!

Collapse -

Expression Building in Access 2000

by D_E_PINDER In reply to Expression Building in Ac ...

see comments

Collapse -

Expression Building in Access 2000

by D_E_PINDER In reply to Expression Building in Ac ...

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

Collapse -

Expression Building in Access 2000

by ESchlangen In reply to Expression Building in Ac ...

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.

Collapse -

Expression Building in Access 2000

by D_E_PINDER In reply to Expression Building in Ac ...

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.

Back to Software Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums