I tried to enter the command, and I got an error and not effect -
Here is what is in my On Open event
Option Compare Database
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Last Seven Days"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
End Sub
Private Sub Command1_Click()
On Error GoTo Err_Command1_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Main Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command1_Click:
Exit Sub
Err_Command1_Click:
MsgBox Err.Description
Resume Exit_Command1_Click
End Sub
Private Sub Command3_Click()
On Error GoTo Err_Command3_Click
Dim stDocName As String
stDocName = "Testing Data - Doctor's Visit - Last 90 Days"
DoCmd.OpenReport stDocName, acNormal
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Sub
Private Sub Command12_Click()
On Error GoTo Err_Command12_Click
DoCmd.Quit
Exit_Command12_Click:
Exit Sub
Err_Command12_Click:
MsgBox Err.Description
Resume Exit_Command12_Click
End Sub
Private Sub Form_Open(Cancel As Integer)
End Sub
What's a person to do....