Controlling the execution flow

Folks, I hope that the active membership of this forum don’t see this as difficult a question as another did. I’m relatively new (12 months) to this programming language and this is all part of my learning, so help me develop.

I use CFC’s via CF8 to interact with an Access db. In 1 screen of my Flash8 application, I have to update up to 7 rows in a table depending on whether a screen field was filled in and each of these updates is an identical activity. Ideally, my code might look something like this:

for(var i = 1; i < 8; i++)
{
if (fieldi != “”)
{
update_record (using key in fieldi);
}
}

I want to check that each update has completed successfully before continuing with the next but the loop won’t wait for a return from the update_record function.

How do get around this asynchronous behavior and maintain a concise mainline structure?