Link to home
Start Free TrialLog in
Avatar of shacho
shacho

asked on

Executing SQL on a Form's Recordset

I have a form with a procedure that updates all records in the data set.  Using SQL is the most efficient way to do this (rather than looping through the form's recordset).  But if I use CurrentDb.Execute strSQL, the form barks at me about another user altering the recordset.  Is there a way to run the SQL within the scope of the form?  Perhaps a DAO or ADO command?

Mike
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shacho
shacho

ASKER

Nice.  I think I see why that works.  Should have considered that.  Thanks a lot!

Mike
That is the solution for a lot of similar issues... basically you want any data that is in the process of being edited to either be "undone" or fully committed to the table before beginning any seperate editing or saving process.  Otherwise, even if it is just the actions of one user, it has the net effect of multiple people stepping on each other's toes.
Avatar of shacho

ASKER

Indeed.  Makes sense.