Criteria for Query

G

Guest

If I needing Manufacturing Shift data,
in my Query grid, i can use something like..
[Forms]![frmMain]![GoShift]....

....where "GoShift" is an unbound textbox on the Form "frmMain".

So, when "GoShift" is 1 or 2, the Query returns data for the Selected Shift.

If I leave out...
[Forms]![frmMain]![GoShift]...It brings in Both Shifts.

Can I use the same Query w/ a "[Forms]![frmMain]![GoShift]" type entry to
get all 3 possible "Shifts" = 1, 2 and Both???

TIA - Bob
 
G

Guest

In the crteria section of the query you should have

Where [GoShiftFieldName] = [Forms]![frmMain]![GoShift] Or
[Forms]![frmMain]![GoShift] Is Null

So the criteria will either bring 1 or 2 As slected or all f nothing was
selected
 
G

Guest

Ofer - I had heard the solution was something like that...I knew the Power
of these Newsgroups.

Thank you - Bob

Ofer Cohen said:
In the crteria section of the query you should have

Where [GoShiftFieldName] = [Forms]![frmMain]![GoShift] Or
[Forms]![frmMain]![GoShift] Is Null

So the criteria will either bring 1 or 2 As slected or all f nothing was
selected


--
Good Luck
BS"D


Bob Barnes said:
If I needing Manufacturing Shift data,
in my Query grid, i can use something like..
[Forms]![frmMain]![GoShift]....

...where "GoShift" is an unbound textbox on the Form "frmMain".

So, when "GoShift" is 1 or 2, the Query returns data for the Selected Shift.

If I leave out...
[Forms]![frmMain]![GoShift]...It brings in Both Shifts.

Can I use the same Query w/ a "[Forms]![frmMain]![GoShift]" type entry to
get all 3 possible "Shifts" = 1, 2 and Both???

TIA - Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top