L
Lauri S
I created a switchboard form and another form both of which have command
buttons to run a query and opening in form view. The query comes from 2
different tables. When I run the query from the query design view window,
everything is fine and I get the results in datasheet view. When I try to run
the query by clicking the command buttons in either form, I get a second
dialog box asking for a parameter value that I didn't set. The second dialog
box looks like this: tblAppts.ApptDate. If I ignore the 2nd dialog box and
hit enter I still get the reults I want; I just don't know why I get that
second box.
Code for command on switchboard:
Private Sub Command27_Click()
On Error GoTo Err_Command27_Click
Dim stDocName As String
stDocName = "qryPtSearch"
DoCmd.OpenForm "frmPatient", , "qryPtSearch"
Exit_Command27_Click:
Exit Sub
Err_Command27_Click:
MsgBox Err.Description
Resume Exit_Command27_Click
End Sub
Code for command on other form(they run the same query):
Private Sub Command15_Click()
On Error GoTo Err_Command15_Click
Dim stDocName As String
stDocName = "qryPtSearch"
DoCmd.OpenForm "frmPatient", , "qryPtSearch"
Exit_Command15_Click:
Exit Sub
Err_Command15_Click:
MsgBox Err.Description
Resume Exit_Command15_Click
End Sub
The form does contain a main form and a subform. It is the subform that
contains all the patient appts.
My 2 tables are tblAppts and tblPatient with the Medical
Record Number (MRN) being the parameter to input to return the results.
Any assistance would be appreciated!!
Lauri S.
buttons to run a query and opening in form view. The query comes from 2
different tables. When I run the query from the query design view window,
everything is fine and I get the results in datasheet view. When I try to run
the query by clicking the command buttons in either form, I get a second
dialog box asking for a parameter value that I didn't set. The second dialog
box looks like this: tblAppts.ApptDate. If I ignore the 2nd dialog box and
hit enter I still get the reults I want; I just don't know why I get that
second box.
Code for command on switchboard:
Private Sub Command27_Click()
On Error GoTo Err_Command27_Click
Dim stDocName As String
stDocName = "qryPtSearch"
DoCmd.OpenForm "frmPatient", , "qryPtSearch"
Exit_Command27_Click:
Exit Sub
Err_Command27_Click:
MsgBox Err.Description
Resume Exit_Command27_Click
End Sub
Code for command on other form(they run the same query):
Private Sub Command15_Click()
On Error GoTo Err_Command15_Click
Dim stDocName As String
stDocName = "qryPtSearch"
DoCmd.OpenForm "frmPatient", , "qryPtSearch"
Exit_Command15_Click:
Exit Sub
Err_Command15_Click:
MsgBox Err.Description
Resume Exit_Command15_Click
End Sub
The form does contain a main form and a subform. It is the subform that
contains all the patient appts.
My 2 tables are tblAppts and tblPatient with the Medical
Record Number (MRN) being the parameter to input to return the results.
Any assistance would be appreciated!!
Lauri S.