Form OnDelete Event

S

Sharkbyte

I have 2 unbound subforms I am working with. When entries are added to the
first, I run code ending with a Requery of the second.

I am trying to do the same thing for when a record is removed. Using the
form's OnDelete event, I am able to execute code. However, even though I
again end with a Requery of the second form, the results suggest that the
Requery doesn't actually fire.

Here is the code I am running:


If IsNull(DLookup("uskillsetid", "qryjobcosting6")) Then
DoCmd.SetWarnings False
DoCmd.RunSQL ("update dbo_tbltechnicianskillsets set _
calculatedrate = 0 where skillsetid = [Forms]! _

[frmtechnicianskillsets]![subfrmTechnicianSkillsets]![txtskillsetid];")
DoCmd.SetWarnings True

[Forms]![frmtechnicianskillsets]![subfrmTechnicianSkillsets1].Requery

Exit Function
Else
End If

Could the Requery be firing before the DoCmd? I have not been able to
determine that any other event is firing after the OnDelete, where I might be
able to trigger the Requery.

All help is appreciated.

Thanks.

Sharkbyte
 

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