A
Afrosheen via AccessMonster.com
Good morning. I'm having a little problem that I hope you can help me get
straight. I thought I had it correct but when I put breaks in it doesn't
display correctly. The information is taken from a Group box
This is the short code
120 Select Case grpDept.Value
240 Case 1
250 strCnt = "Ops. B-Nights"
260 Case 2
270 strDept = "Programs"
280 Case 3
290 strDept = "Programs/Chaplin"
300 Case 4
370 strDept = "Support Services"
380 Case 5
390 strDept = "Unit-1"
400 Case 6
410 strDept = "Unit-2"
420 Case 7
430 strDept = "Unit-3"
440 Case 8
450 strDept = "Unit-4"
480 End Select
The case statements work. Where I'm having the problem is for example in
stead of the person working in Unit-3, he is now working in Unit-3 A-Days.
Unit-3 has 4 different shifts [Days, Nights, A rotation and B rotation]. So
what I'm trying to do is to build the query like below, but it gives me just
the people in Unit-3 and not all the other.
It is on the "Where" statement is. Am I missing something?
490 cboloc.RowSource = "Select [lname] & ', '& [fname], , [email1],
[location]" & _
"From EmpSuper " & _
"Where location like '" & strDept & "' " & _
"And (((Email1) = true))" & _
"Order by Location;"
Your help is very much appreciated. Thank you.
straight. I thought I had it correct but when I put breaks in it doesn't
display correctly. The information is taken from a Group box
This is the short code
120 Select Case grpDept.Value
240 Case 1
250 strCnt = "Ops. B-Nights"
260 Case 2
270 strDept = "Programs"
280 Case 3
290 strDept = "Programs/Chaplin"
300 Case 4
370 strDept = "Support Services"
380 Case 5
390 strDept = "Unit-1"
400 Case 6
410 strDept = "Unit-2"
420 Case 7
430 strDept = "Unit-3"
440 Case 8
450 strDept = "Unit-4"
480 End Select
The case statements work. Where I'm having the problem is for example in
stead of the person working in Unit-3, he is now working in Unit-3 A-Days.
Unit-3 has 4 different shifts [Days, Nights, A rotation and B rotation]. So
what I'm trying to do is to build the query like below, but it gives me just
the people in Unit-3 and not all the other.
It is on the "Where" statement is. Am I missing something?
490 cboloc.RowSource = "Select [lname] & ', '& [fname], , [email1],
[location]" & _
"From EmpSuper " & _
"Where location like '" & strDept & "' " & _
"And (((Email1) = true))" & _
"Order by Location;"
Your help is very much appreciated. Thank you.