I have a search form that has a button so i can open a report by using PWO_Number from the selected entry in the search form.
That field is a Number field.
When I changed it to a Text field, it no longer opens a report based on the PWO_Number; it asks for a paramater value.
Not sure if I have to change something in the code since I went from Number to Text?
Here's my code:
That field is a Number field.
When I changed it to a Text field, it no longer opens a report based on the PWO_Number; it asks for a paramater value.
Not sure if I have to change something in the code since I went from Number to Text?
Here's my code:
PHP:
Private Sub Command60_Click()
On Error GoTo Err_Command60_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "rpt_MultiSearch_PWO Report"
stLinkCriteria = "[PWO_Number]=" & Me![SearchResults]
DoCmd.OpenReport stDocName, acViewReport, , stLinkCriteria
Exit_Command60_Click:
Exit Sub
Err_Command60_Click:
MsgBox Err.Description
Resume Exit_Command60_Click
End Sub