I am running the following code on a button. This runs 2 queries that combines two tables into one. Then a report opens. However, I guess 2 people can't use this report at once because whenever you try to open it when someone else is looking at it, you get an error message. NOT the error handling I have programed ("please try again later".
#1. Why can't 2 people view the report at the same time?
#2. Why doesn't it use my error handling code?
Thanks in advance!
Mickie
Private Sub ALABFIFOLIST_Click()
DoCmd.OpenForm "Please Wait"
DoCmd.SetWarnings False
DoCmd.Hourglass True
DoCmd.OpenQuery "Complaint Testing FIFO maketable"
DoCmd.OpenQuery "QCLOG FIFO appendtable"
DoCmd.Hourglass False
Forms![please wait].SetFocus
DoCmd.Close
DoCmd.SetWarnings True
On Error GoTo Err_ALABFIFOLIST_Click
Dim stDocName As String
stDocName = "ALAB FIFO Report"
DoCmd.OpenReport stDocName, acPreview
Exit_ALABFIFOLIST_Click:
Exit Sub
Err_ALABFIFOLIST_Click:
MsgBox ("Please try again in a moment. The report is currently open"
Resume Exit_ALABFIFOLIST_Click
End Sub
#1. Why can't 2 people view the report at the same time?
#2. Why doesn't it use my error handling code?
Thanks in advance!
Mickie
Private Sub ALABFIFOLIST_Click()
DoCmd.OpenForm "Please Wait"
DoCmd.SetWarnings False
DoCmd.Hourglass True
DoCmd.OpenQuery "Complaint Testing FIFO maketable"
DoCmd.OpenQuery "QCLOG FIFO appendtable"
DoCmd.Hourglass False
Forms![please wait].SetFocus
DoCmd.Close
DoCmd.SetWarnings True
On Error GoTo Err_ALABFIFOLIST_Click
Dim stDocName As String
stDocName = "ALAB FIFO Report"
DoCmd.OpenReport stDocName, acPreview
Exit_ALABFIFOLIST_Click:
Exit Sub
Err_ALABFIFOLIST_Click:
MsgBox ("Please try again in a moment. The report is currently open"
Resume Exit_ALABFIFOLIST_Click
End Sub