A
Afrosheen via AccessMonster.com
I have an SQL statement that is way to long.
bd="days"
bn="nights"
ds="day shift"
and so on.
stwhere1 = "SELECT [shift],[lname],[fname],[locat1]" & _
" FROM [tbl_Roster]" & _
" WHERE [shift] = '" & bd & "' or [shift]='" & bn & "' or [shift]
='" & ds & "' or [shift]='" & dn & "'or [shift]='" & aft & "'"
The above WHERE is on one line and it works.
I was wondering if I could use something like this to make it more readable?
" WHERE [shift] = '" & bd & and & bn & and & ds & and & dn & and & aft & "'"
Thanks for your help. It is much appreciated.
bd="days"
bn="nights"
ds="day shift"
and so on.
stwhere1 = "SELECT [shift],[lname],[fname],[locat1]" & _
" FROM [tbl_Roster]" & _
" WHERE [shift] = '" & bd & "' or [shift]='" & bn & "' or [shift]
='" & ds & "' or [shift]='" & dn & "'or [shift]='" & aft & "'"
The above WHERE is on one line and it works.
I was wondering if I could use something like this to make it more readable?
" WHERE [shift] = '" & bd & and & bn & and & ds & and & dn & and & aft & "'"
Thanks for your help. It is much appreciated.