Results 1 to 5 of 5
  1. #1
    taimysho0 is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    286

    Need Help with writing Query for TWO TABLES

    Hello, i have a table (table 1) with 2 columns (serial, and due date)



    i also have another table (table 2) that shows (date requested)

    i want the proper due date to show up for the date requested (whatever 'due date' is closest to the date requested (from table 2) should be displayed) . Also, this depends on what serial it is as well. Its a little confusing so i have some pictures below



    so, on the table with "serial" and "due date", each serial corresponds to 1 due date per month, all the way from B-Z.


    please let me know if more clarification is needed. thanks!

  2. #2
    taimysho0 is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    286
    something along the lines of if...serial B and date requested = 1/17/2012 then
    due date = 1/25/2012 (closest due date from the "due date column" for serial B)

  3. #3
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,538

  4. #4
    taimysho0 is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Nov 2011
    Posts
    286
    wasnt sure if this was a query or programming issue..

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Quote Originally Posted by taimysho0 View Post
    something along the lines of if...serial B and date requested = 1/17/2012 then
    due date = 1/25/2012 (closest due date from the "due date column" for serial B)
    There is a post here where someone was looking to find the "closest" date. It may be helpful.
    http://www.mrexcel.com/forum/showthread.php?t=605407

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

Similar Threads

  1. RowSource Value not writing to the Table
    By tbassngal in forum Queries
    Replies: 5
    Last Post: 09-03-2011, 12:16 PM
  2. Replies: 7
    Last Post: 05-31-2011, 11:51 AM
  3. Help Writing VBA and call to query
    By brianb in forum Programming
    Replies: 7
    Last Post: 03-09-2011, 09:42 AM
  4. Writing Query Results to New Table
    By quigongrim in forum Queries
    Replies: 2
    Last Post: 08-23-2010, 09:04 AM
  5. I need help writing a query statement
    By dking in forum Queries
    Replies: 1
    Last Post: 02-25-2009, 09:43 AM

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