Results 1 to 5 of 5
  1. #1
    Stepford is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Swindon, UK
    Posts
    7

    How can I get Switchboard to show users when data was last updated?


    Hello
    I maintain a shared database that I would like other users to be able to see when the data was last updated when they open it so that they can see how up to date the information is from the switchboard.
    Currently I am doing this manually by updating the date in a label on the switchboard header, but ideally I would like to add a final action to my update macro (that imports new data into the database) that would automatically do this for me on completion if possible.
    Any help or suggestions on how I could do this would be greatly appreciated.
    Many thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    You will need a table (say tLog ) to append data the last time a user updated what table.
    Then you can pull dMax([LastUpdate]) for it.

  3. #3
    Stepford is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Swindon, UK
    Posts
    7
    Thanks for than ranman256, but could you offer me some more info on that please? This table you are calling tLog: how does it work, etc.? And are you able to give me the code I would need to add at the end of my macro in order to pull dMax([LastUpdate])?
    Many thanks for any further information you can provide

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    make a table tLog, w fields:
    [user]
    [LastUpdDate] (this has the DEFAULT VALUE = NOW())
    [form]

    when a user updates a screen you need it to execute the query
    in the form_AFTERUPDATE event

    sSql = "append to tLog ([user],[form]) values ('" & CurrentUser() & "','" & me.name & "')"

    This will track who updated the data, when, and where.

    the last update date would be: Dmax([LastUpdDate],"tLog","[form]='" & me.name & "'")

  5. #5
    Stepford is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Swindon, UK
    Posts
    7
    OK, thanks again ranman256, but I think maybe I need to explain exactly what I am doing when updating.
    I have 1 table in my database called Transactions, which I update pretty much daily. To do this I have a saved import that imports the data from an excel spreadsheet and appends it to the table. I have assigned this to a macro called Import-Transaction, which in turn I have added as one of my menu items on my switchboard: the user click the update button and the macro executes the Saved Import and appends the new data to the table called Transactions, which is all good: but I would also like to be able to have this macro finish off by updating the last update date on the switchboard, but only following this action.
    Hopefully this makes a bit more sense and I am not missing any of your points? Any suggestions?
    Many thanks

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

Similar Threads

  1. Replies: 15
    Last Post: 03-28-2014, 07:29 AM
  2. Page header won't show in switchboard
    By sevanty7 in forum Forms
    Replies: 1
    Last Post: 05-15-2013, 08:19 AM
  3. Replies: 1
    Last Post: 02-27-2012, 10:41 AM
  4. Replies: 8
    Last Post: 01-20-2012, 05:07 PM
  5. Replies: 1
    Last Post: 03-02-2010, 05:01 PM

Tags for this Thread

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