Show Status of Updates to users

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mld01s
    New Member
    • Sep 2008
    • 5

    Show Status of Updates to users

    HI to all I need help. I have created a database that updates information daily, in order to start the update I have to run three queries (append, make and update). I already added the code to run the queries at the same time with the push of a button, but I would like to display the users information showing if the information was updated correctly. Just a window maybe displaying "Update successful!", that way the users know that the update worked, if not they could press the command button more than once, therefore appending the information more the once. Also if I could find a way to only limit one update a day based on date() would be great. Please let me know if anybody can help.....Thanks .
  • puppydogbuddy
    Recognized Expert Top Contributor
    • May 2007
    • 1923

    #2
    Instead of a message, try turning your mouse cursor to an hourglass and back. The code is as follows:
    Code:
     DoCmd.Hourglass True
        DoCmd.Echo False
        'Your Code here >>>>>>DoCmd.OpenQuery, etc.
        DoCmd.Echo True
        DoCmd.Hourglass False
    Regarding preventing duplicate updates, I suggest the following:
    1. Add a new field to your table>>>DateLas tModified (datatype= dateTime)
    2. Add this field to your update query.
    3. Place the following constraint in the criteria row of new field ..... <> Date()
    4. Test it out. It should update only those records with a date different than today.

    Comment

    • youmike
      New Member
      • Mar 2008
      • 69

      #3
      Originally posted by mld01s
      Also if I could find a way to only limit one update a day based on date() would be great.
      In order to prevent double input of data, suggest you look at the primary key you have assigned to the receiving table. If you choose correctly, you can be sure that duplication is impossible.

      Regarding recording of update timing, I'd suggest an approach which uses a log table to which an entry is added at the end of each successful update. That way before allowing an update, you could read the date and time of the most recent event and either prevent a further update, or perhaps issue a caution message.

      Comment

      • mld01s
        New Member
        • Sep 2008
        • 5

        #4
        Thank you guys for the answers!! Really helped me to get things going with this db.

        Comment

        Working...