Hi all
I'm having problem with a difficult SQL statement I am trying to create a recordset on. I get a "compile error: Expect expression" when I try to create it. Can someone help me with the syntax?
Here it is:
"SELECT [Item No] FROM [Bin Master] WHERE (([Bin Master].[Primary]) = True) and (([Bin Master].[Bin Loc]) = " & "'" & Trim([Forms]![Bin Master Form]![Location]) & "'" & "
" and (([Bin Master].[Item No]) = " & "'" & Trim([Forms]![Bin Master Form]![ITEM_NO]) & "'" & "
"
I have traced it down to the fact that I have/need to two double quotes in the string. Is there anyway to get this to work? I have a couple of other forms that need a similar statement so any help would go a long way.
Thanks in advance,
Matt L
I'm having problem with a difficult SQL statement I am trying to create a recordset on. I get a "compile error: Expect expression" when I try to create it. Can someone help me with the syntax?
Here it is:
"SELECT [Item No] FROM [Bin Master] WHERE (([Bin Master].[Primary]) = True) and (([Bin Master].[Bin Loc]) = " & "'" & Trim([Forms]![Bin Master Form]![Location]) & "'" & "
I have traced it down to the fact that I have/need to two double quotes in the string. Is there anyway to get this to work? I have a couple of other forms that need a similar statement so any help would go a long way.
Thanks in advance,
Matt L