Synchronisation problem

J

Jan

Dear Access gurus,

I have what I believe to be a synchronisation problem in access 2002. I use a form with a subform. On a button on the main form, I delete records that are displayed in the subform, and then I do a refresh in the main form:

Me.Subform.Form.Requery
Me.Subform.Form.Refresh
Me.refresh

But the deleted records don't disappear. The do however disappear when I add a stupid loop:

For iTest = 0 To 10000
DoEvents
Next

so I suppose the delete was not executed yet when I did the refresh.

I tried to open the connection synchronously:
cnAdo_Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Me.Application.CurrentDb.name & ";", , , adConnectUnspecified

And I tried to create the connection with events:
Private WithEvents cnAdo As ADODB.Connection

so I could do the refreshing on the ExecuteComplete event or the CommitTransComplete event.

But nothing was succesfull and I'm running out of ideas.

Thanks for any help,
Jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top