UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Confirmation On Each Row Update    
 
   
jokeme71
post Apr 9 2007, 01:29 PM
Post #1

UtterAccess Guru
Posts: 870
From: Maryland



I have an update query that updates the records of one table by the contents of another for 6 specific fields.

Each time a record is updated via this update query I would like a message box to appearthat shows the old value and the new value for the 6 fields that gives the user the option to accept the change or flag the change for further review.

I figure I have to use a loop or two but am not sure how to accomplish this.

Any thoughts? Suggestions?
Go to the top of the page
 
+
HiTechCoach
post Apr 9 2007, 01:33 PM
Post #2

UtterAccess VIP
Posts: 18,396
From: Oklahoma City, Oklahoma



You could use a a recordset to loop through the records with the data to be updated and then display the data to the user to confirm. If accepted, you would then create an Update query with VBA and then run it to update the single record. This would continue until all record had be read

IMHO, your approach is not very user friendly. I would use a form that displays all the reords and then let the user pick the records that want to update. Then update all the records at once.

Edited by: HiTechCoach on Mon Apr 9 14:36:54 EDT 2007.

Edited by: HiTechCoach on Mon Apr 9 14:42:24 EDT 2007.
Go to the top of the page
 
+
jokeme71
post Apr 9 2007, 02:07 PM
Post #3

UtterAccess Guru
Posts: 870
From: Maryland



Very good point and thanks forthe quick response. I can exactly waht you are saying. Just for my knowledge though... if the user reviewed the message box and found the data incorrect how would I write the code to update a field for just that specific record from the recordset?

I am working the form solution but can see where I may want to use the message box method for a simple compare down the road that deals with say a bulk record update.
Go to the top of the page
 
+
HiTechCoach
post Apr 9 2007, 02:26 PM
Post #4

UtterAccess VIP
Posts: 18,396
From: Oklahoma City, Oklahoma



QUOTE
if the user reviewed the message box and found the data incorrect how would I write the code to update a field for just that specific record from the recordset?

You have to do it one record at a time. You get the first record to with the data to be updated, Ask to update , is yes, then run an append query for just that ONE record by creating an SQL statement to update the single record, get the new record and repeat the process one record at a time.

I have an example in the Utter Access Code archive forum for "Batch Printing" that may give you some guidance.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 25th May 2013 - 03:26 AM