Hi Folks,
I hope you can help me, maybe it's just one simple command I can't find in
my VB books.

I'm performing a SQL-query from VB 5 to a Access 97 dabatbase. Right after
that I call a dll that analyses the data from the table I just changed.
Here is the source code and I thought it would go just fine...

' open database and edit the content
Set rst = dbs.OpenRecordset("select * from stoerdat;")

If rst.EditMode = dbEditNone Then
End If

For k = 1 To UBound(arrayMessages)

rst("Faultmessage") = arrayMessages(k).Msg
rst("Duration") = arrayMessages(k).Dur
rst("Starttime") = arrayMessages(k).startMsg
rst("Endtime") = arrayMessages(k).endMsg
rst("Profile") = arrayMessages(k).profile
rst("BrandNo") = arrayMessages(k).brandno
rst("Startbrand") = arrayMessages(k).startBrand
rst("Endbrand") = arrayMessages(k).endBrand
rst("Status") = arrayMessages(k).status
rst("startAuto") = arrayMessages(k).startAuto
rst("endAuto") = arrayMessages(k).endAuto

Next k


'call dll for evaluation of the data
call statresult(AAV, AAM, AAS, ADV, ADM, ADS)

...but it doesn't!!
VB doesn't wait, until the SQL-query has finished. So the dll starts the
evaluation while Access is still changing the data of the table. I don't
have to tell you that I'm getting wrong results by this. For example the
table stoerdat contains 60.000 rows, but the dll is called at a time when
there are just 40.000 rows in that table.

How can I make VB wait, until Access finished the SQL-query??
Maybe there is a parameter like 'vbModal' for forms??!!??
Maybe I don't see the wood for the trees!!

Thanks a lot for your support,

Daniel Teufert