Prev: help with slow form loading problem
Next: How to send data from local database to MySQL db on website
From: Jon Lewis on 8 Jul 2010 05:04
I'm running into a problem I've not encountered before and was wondering if
anyone else has.
In a split Database after running a standard DoCmd.RunCommand
acCmdDeleteRecord from a command
button in the header of a continuous pop-up form I'm running code in the
Form's AfterDelConfirm Event to requery some dependent subforms on another
As you can see below, I'm confirming the Status argument first but it seems
that the subform requeries are sometimes actually happening before the
relevant record has actually been deleted from the table as the relevant
fields end up displaying #Deleted. Sticking in a DoEvents doesn't seem to
make any difference and worse, this is an intermittent problem.
I've also noticed inconsistency with doing something like this before:
Me.AllowDeletions = True
Me.AllowDeletions = False
which can fail with the "Delete not available" error as if the
AllowDeletions hadn't actually been set when acCmdDeleteRecord is executed.
Private Sub Form_AfterDelConfirm(Status As Integer)
If Status = acDeleteOK Then
If IsLoaded("frmSite") Then
Anybody seen this before or have a foolproof resolution (other than running
some sort of check in a Loop before subsequent code execution, which seems