Results 1 to 4 of 4
  1. #1
    dylcon is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Ann Arbor
    Posts
    130

    Calculating a date from another table's record

    Hello, I was wondering if anyone could help me out with using the


    Code:
    DateAdd(Interval, Number, Date)
    function. More specifically, I am using a bound form with a table that I need the date for. The date will be an integer from a specific record (based on a search) from a seperate table, and then added to the current day's date (in days).

    If anymore information is required, please let me know. If there are any other ways to do this, I am more than happy to listen as well. Thanks!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    51,017
    What is the criteria for the search? Does user select something in combobox from a list of values that determines which date record to search for? Do a query that joins the tables on the selected identifier. Do date calc in query or in textbox.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    dylcon is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Ann Arbor
    Posts
    130
    The criteria is the 'PartID'. The user selects a customer and a part number, which will give the PartID. This is what I want to search for within a table that is NOT bound to the form. Once this record is found, the database will use a previously populated field to populate a (hidden) field on the form, which will then be stored into the table.

    Is a joint query still the best method for this?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    51,017
    I don't know enough about data structure. Joining tables might be solution. Domain aggregate functions (DLookup, DAvg, DMax, etc) are another way to retrieve a value from table or query. Those functions can be used in query, textbox, or code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Calculating Qurter out of Date
    By dinesh_ltjd in forum Access
    Replies: 5
    Last Post: 02-22-2013, 07:07 PM
  2. Replies: 18
    Last Post: 02-06-2013, 12:43 PM
  3. Calculating Year to Date data in Form
    By barnes434 in forum Forms
    Replies: 3
    Last Post: 05-16-2012, 02:56 PM
  4. Calculating a date range
    By unicorn in forum Queries
    Replies: 6
    Last Post: 01-18-2012, 08:58 AM
  5. Calculating Expiry Date -
    By Jojojo in forum Programming
    Replies: 12
    Last Post: 10-05-2011, 12:05 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