I need to make shift entry optional

  • Thread starter bhrosey via AccessMonster.com
  • Start date
B

bhrosey via AccessMonster.com

I have a report I run where I query date, shift and department from a table.
In my query, how can I make the shift and/or department optional? Without
creating a bunch of different reports I want to be able to see all the data
from an entire day within a dept or both dept's on a given shift. As it is
right now I can only see 1 shift and 1 dept at a time. Thanks in advance for
the help.

God Bless,
Bill R.
 
M

Maurice

You could use parameters in your query like:

Like * & [Shift] & *

and for the dept

Like * & [dept] & *

place the two statements in the criteria fields (shift - dept) of the query.
Now if you don't choose a shift or dept you'll see all the records. If you
only choose a shift without the dept you'll see all the shifts. If you enter
a shift and a dept you'll see that criteria..

hth
 
J

John Spencer

Better would be to use
Like Nz([Shift],"*')

Like Nz([Dept],"*")

Those rely on Shift and Dept fields to be text fields and not number fields.

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

Maurice said:
You could use parameters in your query like:

Like * & [Shift] & *

and for the dept

Like * & [dept] & *

place the two statements in the criteria fields (shift - dept) of the
query.
Now if you don't choose a shift or dept you'll see all the records. If you
only choose a shift without the dept you'll see all the shifts. If you
enter
a shift and a dept you'll see that criteria..

hth
--
Maurice Ausum


bhrosey via AccessMonster.com said:
I have a report I run where I query date, shift and department from a
table.
In my query, how can I make the shift and/or department optional?
Without
creating a bunch of different reports I want to be able to see all the
data
from an entire day within a dept or both dept's on a given shift. As it
is
right now I can only see 1 shift and 1 dept at a time. Thanks in advance
for
the help.

God Bless,
Bill R.
 
Top