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.
* I have also attempted to identify the subform as: [formname].Form.Requery
but Access says it's not supported.
All help is appreciated.
Thanks.
Sharkbyte
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.
* I have also attempted to identify the subform as: [formname].Form.Requery
but Access says it's not supported.
All help is appreciated.
Thanks.
Sharkbyte