statments in a filter

  • Thread starter Thread starter Afrosheen
  • Start date Start date
A

Afrosheen

Thanks for looking at my question.
I need a filter that will match 4 criteria. Everything must be equal to.

Here is the statement I'm using.

stwhere = "[shift] = 'A-Days' or [shift]='B-Days' or [shift] = 'Day Shift'or
[status]='Working'"

DoCmd.OpenReport stDocName, acViewPreview, , stwhere, , "A-Days Post Report"

All of that must match up then print the report. It will print on the docmd,
but it will show those on either A-days or B-days "Not Working". I just want
it to show those working.

What am I doing wrong?
 
stwhere = "([shift] = 'A-Days' or [shift]='B-Days' or [shift] = 'Day Shift')
AND [status]='Working'"

Or alternative
stwhere = "[shift] IN ('A-Days','B-Days','Day Shift') and [status]='Working'"

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
Back
Top