By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,868 Members | 1,159 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,868 IT Pros & Developers. It's quick & easy.

Show Status of Updates to users

P: 5
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.
Sep 22 '08 #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 1,923
Instead of a message, try turning your mouse cursor to an hourglass and back. The code is as follows:
Expand|Select|Wrap|Line Numbers
  1.  DoCmd.Hourglass True
  2.     DoCmd.Echo False
  3.     'Your Code here >>>>>>DoCmd.OpenQuery, etc.
  4.     DoCmd.Echo True
  5.     DoCmd.Hourglass False
Regarding preventing duplicate updates, I suggest the following:
1. Add a new field to your table>>>DateLastModified (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.
Sep 22 '08 #2

P: 69
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.
Sep 22 '08 #3

P: 5
Thank you guys for the answers!! Really helped me to get things going with this db.
Sep 23 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.