Results 1 to 2 of 2
  1. #1
    Erl050 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2011
    Posts
    1

    How to return a field based on another date field

    Hello,



    I am trying to create a query that will return a data field based on a specific month in a date field. I currently have a table with the following rows: Employee Name, Reason Code, Hours, and Event Date. I would like to query the hours for each month of the year in one query so it could look like the following:

    Name Reason Code January [Hours] February [Hours] etc.

    I could not find the answer anywhere and I'm about to pull my hair out. Thanks for any advice you all can give!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Play with the crosstab query wizard. You should be able to achieve that result, perhaps with a little tweaking.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 02-06-2011, 06:36 PM
  2. Replies: 5
    Last Post: 01-20-2011, 11:36 PM
  3. Selecting a corresponding table field based on text field.
    By michaeljohnh in forum Programming
    Replies: 5
    Last Post: 10-08-2010, 10:33 AM
  4. Field content based on date calculation
    By jlmnjem in forum Programming
    Replies: 6
    Last Post: 09-23-2010, 10:24 AM
  5. lost - linking date field based on a record with smaller Unique ID
    By stan.chernov@gmail.com in forum Queries
    Replies: 7
    Last Post: 09-16-2010, 02:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums