N
NFL
I hope I don't frustrate you with another question.. Thank you for your input!
Here are the codes for the report file....
Option Compare Database
Private Sub Report_Close()
DoCmd.Close acForm, "ParaForm"
End Sub
Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenForm "ParaForm", , , , , acDialog
End Sub
---------------------------------
Here are the codes for the ParaForm ....
Private Sub Command5_Click()
On Error GoTo Err_Command5_Click ' Cancel Button t
DoCmd.Close
Exit_Command5_Click:
Exit Sub
Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click
End Sub
Private Sub Command2_Click() 'OK Button to Continue
Me.Visible = False
End Sub
This is where the code begins on a separate form......
Private Sub Command119_Click() ' Main Form
On Error GoTo Err_Command119_Click
Dim stDocName As String
stDocName = "HistoryOutcomeRpt"
DoCmd.OpenReport stDocName, acPreview
Exit_Command119_Click:
Exit Sub
Err_Command119_Click:
MsgBox Err.Description
Resume Exit_Command119_Click
End Sub
The report picks a criteria by opening a form_paraform and and looks at the
combobox. The user will select the criteria and press the OK button which
works fine. What I like to do is to modify the cancel button canel the
entire process without looking at the "Enter parameter Value" box . How can
I get rid of that if a user decides he/she does not want to look at the
report?
Here are the codes for the report file....
Option Compare Database
Private Sub Report_Close()
DoCmd.Close acForm, "ParaForm"
End Sub
Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenForm "ParaForm", , , , , acDialog
End Sub
---------------------------------
Here are the codes for the ParaForm ....
Private Sub Command5_Click()
On Error GoTo Err_Command5_Click ' Cancel Button t
DoCmd.Close
Exit_Command5_Click:
Exit Sub
Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click
End Sub
Private Sub Command2_Click() 'OK Button to Continue
Me.Visible = False
End Sub
This is where the code begins on a separate form......
Private Sub Command119_Click() ' Main Form
On Error GoTo Err_Command119_Click
Dim stDocName As String
stDocName = "HistoryOutcomeRpt"
DoCmd.OpenReport stDocName, acPreview
Exit_Command119_Click:
Exit Sub
Err_Command119_Click:
MsgBox Err.Description
Resume Exit_Command119_Click
End Sub
The report picks a criteria by opening a form_paraform and and looks at the
combobox. The user will select the criteria and press the OK button which
works fine. What I like to do is to modify the cancel button canel the
entire process without looking at the "Enter parameter Value" box . How can
I get rid of that if a user decides he/she does not want to look at the
report?