handling "all" in queries

A

Art

Hi,

this might be a simple solution to many of you, but I am trying to build a
combo box that will select the item selected and "all" records when "all" is
selected. Thanks in advance for the help.

Art
 
D

Douglas J. Steele

Your criteria would be something like

WHERE (Field1 = Forms![NameOfForm]![NameOfCombo]
OR Forms![NameOfForm]![NameOfCombo] = "all")
 
A

Art

Hi Douglas,

I think i I was not clear on me explaining my issue.

I have a combo box based on a query. Lets say this query displays
All
text1
text2
text3
Now when the user selects "All", text1, text2, and text3 will display,
otherwise when the user selects text1, text1 should display so on and so
forth. Hope this is clearer. thanks Doug.

Art



Douglas J. Steele said:
Your criteria would be something like

WHERE (Field1 = Forms![NameOfForm]![NameOfCombo]
OR Forms![NameOfForm]![NameOfCombo] = "all")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Art said:
Hi,

this might be a simple solution to many of you, but I am trying to build a
combo box that will select the item selected and "all" records when "all"
is
selected. Thanks in advance for the help.

Art
 
D

Douglas J. Steele

That's exactly what I gave you.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Art said:
Hi Douglas,

I think i I was not clear on me explaining my issue.

I have a combo box based on a query. Lets say this query displays
All
text1
text2
text3
Now when the user selects "All", text1, text2, and text3 will display,
otherwise when the user selects text1, text1 should display so on and so
forth. Hope this is clearer. thanks Doug.

Art



Douglas J. Steele said:
Your criteria would be something like

WHERE (Field1 = Forms![NameOfForm]![NameOfCombo]
OR Forms![NameOfForm]![NameOfCombo] = "all")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Art said:
Hi,

this might be a simple solution to many of you, but I am trying to
build a
combo box that will select the item selected and "all" records when
"all"
is
selected. Thanks in advance for the help.

Art
 
Top