S
Shiller
Experts,
I created a function to run multiple update queries in my
application... it worked fine with 2 update queries, however it
stopped responding when I try running it with 4 update queries. Is
there a limitation on how many update queries an application may have:
Function RunUpdateQueries() As Boolean
On Error GoTo ErrorHandler
Dim strQuery As String
strQuery = "qryUpdateSUM1"
DoCmd.OpenQuery strQuery
DoCmd.Close
strQuery = "qryUpdateSUM2"
DoCmd.OpenQuery strQuery
DoCmd.Close
strQuery = "qryUpdateSUM3"
DoCmd.OpenQuery strQuery
DoCmd.Close
strQuery = "qryUpdateSUM4"
DoCmd.OpenQuery strQuery
DoCmd.Close
ExitHere:
Exit Function
ErrorHandler:
MsgBox Err.Number & vbCrLf & Err.Description, vbOKOnly +
vbCritical, "Microsoft Access Error"
RunUpdateQueries = False
Resume ExitHere
End Function
I created a function to run multiple update queries in my
application... it worked fine with 2 update queries, however it
stopped responding when I try running it with 4 update queries. Is
there a limitation on how many update queries an application may have:
Function RunUpdateQueries() As Boolean
On Error GoTo ErrorHandler
Dim strQuery As String
strQuery = "qryUpdateSUM1"
DoCmd.OpenQuery strQuery
DoCmd.Close
strQuery = "qryUpdateSUM2"
DoCmd.OpenQuery strQuery
DoCmd.Close
strQuery = "qryUpdateSUM3"
DoCmd.OpenQuery strQuery
DoCmd.Close
strQuery = "qryUpdateSUM4"
DoCmd.OpenQuery strQuery
DoCmd.Close
ExitHere:
Exit Function
ErrorHandler:
MsgBox Err.Number & vbCrLf & Err.Description, vbOKOnly +
vbCritical, "Microsoft Access Error"
RunUpdateQueries = False
Resume ExitHere
End Function