Assuming that all the fields that the user could select from in each of these tables are text, try:
strApply = "[" & strField & "] = """ & strFilter & """"
If all of the fields that could be selected are not text, then you are going to have to figure out a way to determine the datatype of the field before creating strApply. You could use a function like the following:
Public Function FieldType(TableName As String, Fieldname As String) As Integer
Dim strSQL As String
Dim rs As DAO.Recordset
strSQL = "SELECT [" & Fieldname & "] FROM [" & TableName & "] WHERE False"
strSQL = Replace(Replace(strSQL, "[[", "["), "]]", "]")
Set rs = CurrentDb.OpenRecordset(strSQL, , dbfailonerror)
FieldType = rs.Fields(0).Type
rs.Close
Set rs = Nothing
End Function
And then do something like:
intFieldType = FieldType(strReport, strField)
SELECT Case intFieldType
Case dbBigInt, dbBoolean, dbByte, cbCurrency, dbDecimal, dbDouble, dbFload, dbInteger, dbLong, dbNumeric
strApply = "[" & strField & "] = " & strFilter
Case dbChar, cbText, dbMemo
strApply = "[" & strField & "] = """ & strFilter & """"
Case dbDate, dbTime
strApply = "[" & strField & "] = #" & strFilter & "#"
Case Else
msgbox "Unexpected data type = " & intFieldType
'This one should include all values
strApply = ""
End Select
me.subReport.Report.Filter = strApply
me.subReport.Report.FilterOn = (strApply <> "")