Yes, you spotted another flaw I had. I had forgotten to concatenate it with itself. See the first red bit. Then we also need the other red bits (& Chr(34)) where we surround the text values with quotes:
Code:
Private Sub cmd18_Click()
On Error GoTo Err_cmd18
Dim strFilter As String
Dim strHold As String
Dim intCount As Integer
intCount = 1
Do Until intCount = 19
If Len(Me.Controls("txt" & intCount).Value & vbNullString) > 0 Then
strHold = strHold & Chr(34) & Me.Controls("txt" & intCount).Value & Chr(34) & ","
End If
intCount = intCount + 1
Loop
If Left(strHold, 2) = ", " Then
strHold = Left(strHold, Len(strHold) - 2)
End If
strHold = " In(" & strHold & ")"
strFilter = "[aims_WKO].[TAG_NUMBER] " & strHold & "AND aims_WCT.RESPONSE = '006' AND aims_EQU.EQU_STATUS = 'I' AND aims_WKO.WO_TYPE='pm'"
DoCmd.OpenReport "RPT18", acViewPreview, , strFilter
cmd18_ExitHere:
Exit Sub
Err_cmd18:
MsgBox Err.Description
Resume cmd18_ExitHere
End Sub