Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Run an action on recently added records to a table

Avatar of anthonytr
anthonytrFlag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft AccessMicrosoft SQL ServerVBA
13 Comments1 Solution121 ViewsLast Modified:

I have an INSERT SQL query which is contained within a LOOP action.  When the LOOP is completed I need to ask the user if they want to run a task relating to the new records which were just inserted.

My plan at the moment is to have a new field added to the table which the data is being inserted and name it NEW (yes/no).  When new records are inserted, the insert query will assign them YES.  At the end of the process when the user is asked if they want to see/print the newly inserted records I can then run a select query based on that table where the NEW field = true/1.  Once this has run I will set all TRUE fields to FALSE.

Does this method make sense?  Am I going about this totally wrong?  Is there a better and cleaner way of approaching this?  Really happy to see suggestions of simpler coding.

Avatar of PatHartman
This problem has been solved!
Unlock 1 Answer and 13 Comments.
See Answers