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:
cnAd
pen "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
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:
cnAd
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