Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42466

[RESOLVED] An SQL WHERE string with 3 variables, Syntax Problems, I'm half there.

$
0
0
I'm having a horrible time getting the syntax correct on converting this working string:
"WHERE(((tblInst.Bank_No)=1)AND((tblInst.Teller_No)=2)AND((tblInst.Window_No)=3));"

To

A string with the variables Bank, Tel, & Win in place of the numbers, like:
"WHERE (tblInst.Bank_No)=" & Bank And (tblInst.Teller_No) = " & Tel AND (tblInst.Window_No)=" & Win & ";"

I have tried many different permutations of more parentheses, single quotes, and double quotes, keeps returning a syntax or missing operator error.

Any help appreciated.

Viewing all articles
Browse latest Browse all 42466

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>