Wednesday, 11 September 2013

Microsoft Access Query - Finding Data Based On Date

Microsoft Access Query - Finding Data Based On Date

I have an excel table in which there are multiple date columns. Each date
column has another column next to it that has the total number of items
for that day. So, for example, the table has Date 1, then Number of Items
1, then Date 2 and Number of Items 2 and so on and so forth up until 10.
Example:
Date 1 --------| Number of Items 1| Date 2-----| Number of Items 2
9/10/13 -------| -------2---------------| 9/11/13----|-------3---------
9/9/13 --------| -------2----------------| 9/10/13----|-------3---------
I need a way in Microsoft Access to design a query that can grab the total
number of items for a specified date in each row. The issue is that the
dates that are entered into each date column aren't going to be uniform,
meaning that the first row entry for Date 1 and Date 2 might be 9/10/13
and 9/11/13 but the entry into the next row for Date 1 and Date 2 might be
9/09/13 and 9/10/13 respectively (see the example above).
The purpose of this is to be able to determine the total number of items
people have entered into the table based on the date I specify. As you can
see, this presents an issue because if I needed to find the number of
items for 9/10/13, I would need to somehow pull in the data in the first
row from the Number of Items 1 column and from row two in the Number of
Items 2 column. Although the structure of the table isn't ideal for what
I'm trying to accomplish, I have no control over its design.
Is this possible, and if so how can it be accomplished?

No comments:

Post a Comment