Matching Table value to Query Expression

  • Thread starter Thread starter fullera
  • Start date Start date
F

fullera

Hello All,

I am in need of some assistance. I am completely burnt out after
putting together a database. My database tracks our workers
efficiency. This is done for each order that comes through my
database and each order contains items with predetermined work times.
I then take how many of each item that builder completed and SUM the
predetermined times and divide by the hours in the work day. Now for
my problem. I know this will be easy to resolve but I cannot get it
into my head. I have a table that contains dates and number of hours
worked in that day (filled in by the manager ahead of time). I need
this date to find a match in my query that holds the date the item was
completed and apply the hours worked in that day to the record. I
have tried DLOOKUP but I do not have a link between my query holding
the date stamp and the table holding my dates and scheduled work
hours. This a crucial part of my reporting and I just cannot get it
to work. I thank you in advance for any help you can lend.
 
SELECT a.theDate, b.Worker, SUM(b.worked)
FROM tableAheadOfTime As a INNER JOIN tableBuilderComplete As b
ON a.theDate = b.theDate
GROUP BY a.theDate, b.Worker


would do, assuming you wish the SUM of worked hours by date, by worker (as
you can see in the GROUP BY clause). The elusive part was to use a join,
between the two tables, and forcing a match on the date, I assumed both
tables were using the field name theDate, to store that information. I also
assume that theDate fields do not hold any time part (ie, 00:00:00 is the
time part, or midnight, which is by default if you don't enter a time).



Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top