pbuethe
Returning User
- Local time
- Today, 12:27
- Joined
- Apr 9, 2002
- Messages
- 210
Here is my code. This has been running OK for years, now suddenly the delete and append queries do not seem to be running.
This code is supposed to:
1.delete all data in table FacilityHits
2.Append new data to table FacilityHits
3.Call Calc_Fac_Total to calculate a facility distribution from FacilityHits
4.Open form frmOrderDetail_FacDist to display the facility distribution
Now, clicking the button has no effect on FacilityHits. The form opens displaying the old data. Also, when I commented out the lines with
"DoCmd.SetWarnings False" and ran the code again, the warnings still did not appear. I appreciate any help or advice.
Private Sub cmdFacilityDist_Click()
On Error GoTo cmdFacilityDist_Err
DoCmd.SetWarnings False
DoCmd.OpenQuery "delFacilityHits", acNormal, acEdit
DoCmd.SetWarnings False
DoCmd.OpenQuery "ApdFacDistAll", acNormal, acEdit
DoCmd.SetWarnings False
Calc_Fac_Total
DoCmd.OpenForm "frmOrderDetail_FacDist", acNormal, , , acFormEdit, acDialog, (Me.Name)
cmdFacilityDist_Exit:
Exit Sub
cmdFacilityDist_Err:
MsgBox Error$
Resume cmdFacilityDist_Exit
End Sub
This code is supposed to:
1.delete all data in table FacilityHits
2.Append new data to table FacilityHits
3.Call Calc_Fac_Total to calculate a facility distribution from FacilityHits
4.Open form frmOrderDetail_FacDist to display the facility distribution
Now, clicking the button has no effect on FacilityHits. The form opens displaying the old data. Also, when I commented out the lines with
"DoCmd.SetWarnings False" and ran the code again, the warnings still did not appear. I appreciate any help or advice.