Results 1 to 5 of 5
  1. #1
    mainerain is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Location
    Maine, USA
    Posts
    146

    Display Last Saved date and time


    I want to display Last Saved date and time on my Main Menu after doing a vba backup subroutine. I had created an unbound text box and saved the date and time to it at the end of the backup, which was fine but it didn't retain that info when I closed and restarted the application.

    Code:
    Me.tbxFileVersion = Format(Now(), "yyyy-mm-hhnn")

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 10 Office 365
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,538

  3. #3
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    If you're wanting to show that on the main form, you need a table field and bind the textbox to it. Your update process would update this field.

    Unbound controls have no place to store data so the contents are lost when you close the object, provided that the unbound control isn't populated by an expression. Then maybe.
    EDIT - I've found file attribute date/times to be unreliable as reported in Windows Explorer. That's why I would use a table field and the system date time when the operation runs.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    mainerain is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Location
    Maine, USA
    Posts
    146
    My Main Menu didn't use a linked table where I could add a field so I created a new table with one field to store this data. Thanks for the help.

  5. #5
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Been there, done that. You might find that table useful for other db properties or information going forward.
    Glad to have been of some help.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 6
    Last Post: 12-09-2019, 05:34 AM
  2. Replies: 5
    Last Post: 01-05-2017, 06:49 PM
  3. Replies: 11
    Last Post: 07-20-2014, 06:22 PM
  4. Replies: 3
    Last Post: 10-01-2013, 12:59 AM
  5. Date Field Check against Saved Date?
    By Heatshiver in forum Programming
    Replies: 8
    Last Post: 03-26-2012, 11:01 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