No filter when specific option button is selected

E

Emma

I have a Main form that has an option group that filters a
combobox on a subform.

My option group AfterUpdate code is a simple requery, as
follows:

Private Sub Discipline_Frame_AfterUpdate()
Forms!Frm_Jobs_Emma!Sfrm_Tbl_Lit_Broch_Line!
Lit_Broch_Combo.Requery
End Sub

The row source of my combobox currently has the following
SQL statement:

SELECT tbl_Lit_Broch.Discipline,
tbl_Lit_Broch.Description, tbl_Lit_Broch.ID FROM
Tbl_Lit_Broch WHERE tbl_Lit_Broch.Discipline=Forms!
frm_Main.Discipline_Frame;

I would like that when Option 4 is selected that the
filter not run. How would I accomplish this?
 
M

Marshall Barton

Emma said:
I have a Main form that has an option group that filters a
combobox on a subform.

My option group AfterUpdate code is a simple requery, as
follows:

Private Sub Discipline_Frame_AfterUpdate()
Forms!Frm_Jobs_Emma!Sfrm_Tbl_Lit_Broch_Line!
Lit_Broch_Combo.Requery
End Sub

The row source of my combobox currently has the following
SQL statement:

SELECT tbl_Lit_Broch.Discipline,
tbl_Lit_Broch.Description, tbl_Lit_Broch.ID FROM
Tbl_Lit_Broch WHERE tbl_Lit_Broch.Discipline=Forms!
frm_Main.Discipline_Frame;

I would like that when Option 4 is selected that the
filter not run. How would I accomplish this?


I think this will fo that:

.... WHERE (tbl_Lit_Broch.Discipline =
Forms!frm_Main.Discipline_Frame) OR
(Forms!frm_Main.Discipline_Frame = 4)
 

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