Skip Bisconer
Who Me?
- Local time
- Today, 12:54
- Joined
- Jan 22, 2008
- Messages
- 285
I am trying to run this function through a switchboard and it errors out. In the switchboard I used the option to run code and I entered UpdateAssignedOrdersTable as a function name. I converted this from a macro originally and added the SetWarning to the function. Do I need to do something more to make this work?
Public Function UpdateAssignedOrdersTable()
On Error GoTo UpdateAssignedOrdersTabel_Err
DoCmd.SetWarnings = False
DoCmd.OpenQuery "qryCleartblAssignedDailyOrders", acViewNormal, acEdit
DoCmd.OpenQuery "qryUpdateOEInvoiceHeaderToAssignedDailyOrders", acViewNormal, acEdit
DoCmd.SetWarnings = True
UpdateAssignedOrdersTabel_Exit:
Exit Function
UpdateAssignedOrdersTabel_Err:
DoCmd.SetWarnings = True
MsgBox Error$
Resume UpdateAssignedOrdersTabel_Exit
End Function
Public Function UpdateAssignedOrdersTable()
On Error GoTo UpdateAssignedOrdersTabel_Err
DoCmd.SetWarnings = False
DoCmd.OpenQuery "qryCleartblAssignedDailyOrders", acViewNormal, acEdit
DoCmd.OpenQuery "qryUpdateOEInvoiceHeaderToAssignedDailyOrders", acViewNormal, acEdit
DoCmd.SetWarnings = True
UpdateAssignedOrdersTabel_Exit:
Exit Function
UpdateAssignedOrdersTabel_Err:
DoCmd.SetWarnings = True
MsgBox Error$
Resume UpdateAssignedOrdersTabel_Exit
End Function
Last edited: