R
Rizza
I am using Access 2k. I am trying to search for a % in a field.
This is my code that is not working:
Dim strTbl As String, strFld As String
strTbl = "Table_1"
strFld = "model_a"
DoCmd.RunSQL "INSERT INTO [Tbl Search Report](
, [Field], [Data])
SELECT '" & _
strTbl & "', '" & strFld & "', [" & strTbl & "].[" &
strFld & "]" & _
" FROM [" & strTbl & "] WHERE [" & strFld & "] Like
'%[%]%'"
I have also looked in sql books online and found:
Like '%#%%' Escape '#'
This does not work either.
Any suggestions are appreciated.
This is my code that is not working:
Dim strTbl As String, strFld As String
strTbl = "Table_1"
strFld = "model_a"
DoCmd.RunSQL "INSERT INTO [Tbl Search Report](
SELECT '" & _
strTbl & "', '" & strFld & "', [" & strTbl & "].[" &
strFld & "]" & _
" FROM [" & strTbl & "] WHERE [" & strFld & "] Like
'%[%]%'"
I have also looked in sql books online and found:
Like '%#%%' Escape '#'
This does not work either.
Any suggestions are appreciated.