Results 1 to 3 of 3
  1. #1
    lance.heinen is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2014
    Posts
    1

    Pulling a Date from one Table and adding it to another

    I am trying to figure out a way to pull a date from a table and add it to another table automatically. I'm building a database for a harvest/trucking operation and we want to be to set the date everyday and then it pull that date on all of our tickets, reports, etc. Most days we run till after midnight but we want to still record the date as the day we started so I don't think pulling the date from the computer itself would be a good option. Any ideas?



    Thanks/Lance

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,644
    Lots of ways. Keep in mind, the more user friendly, the more code.

    One way is to set the DefaultValue property of the textbox with the first record entry. As long as the form remains open the value will carry forward to new record and won't change until user enters a different date.

    Other methods involve global variable or TempVars or setting a control on a form that never closes. Reference TempVars or textbox or a function that uses global variable in DefaultValue property or in VBA code that populates field.
    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
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,175
    Hi Lance,

    I found that most applications have a lot of settings/preferences that determine how the app should work, like folder locations where to get/store files to import or export, the preferred language of the current user ect. In your case this could be the default date for the application. To store these I designed a tsysParameters table where I can store and retrieve these parameters.
    In your case you can design a form where the user can change the date in the table whenever it is necessary, and then throughout the application the date can be retrieved from the table when needed. For example ,you can retrieve it when opening the form used to manage the trucking operations and store it as a property of that window.

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

Similar Threads

  1. Replies: 6
    Last Post: 08-14-2014, 08:35 AM
  2. Replies: 3
    Last Post: 05-15-2014, 12:26 PM
  3. Need help pulling the date from a file Name.
    By JayRab in forum Import/Export Data
    Replies: 2
    Last Post: 01-23-2014, 11:23 AM
  4. Adding a date to multiple records in table
    By KChilly in forum Programming
    Replies: 9
    Last Post: 08-30-2012, 10:43 AM
  5. Replies: 0
    Last Post: 07-27-2009, 07:51 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