S
Stephen sjw_ost
Hello again,
I have been trying to figure this out for hours and need some help please.
My DB has a table which contains 2 columns. Manager and Location.
Manager has multiple manger names and location describes where they are. so;
Manager Jackie is in Location FLO
Manager Deb is in Location FLO
Manager Rich is in Location JAX
Manager Sam is in Location JAX
I have a form with a combobox that has the rowsource set to pull from the
table. The SQL looks like this;
SELECT t_Manager.Manager, * FROM t_Manager;
This pulls all of the managers and works fine.
The form has 2 checkboxes. 1 for JAX and 1 for FLO.
What I am trying to do is, when either or both checkbox(s) is checked, I
want the managers for that location to show in the combobox. When the
checkbox(s) is unchecked, I do not want anything to show in the combobox. If
both checkboxes are checked, I want all of the managers to show in the
combobox.
I have tried adding the location to the SQL statement but the results will
not reflect how I want in the combobox. Here is the SQL statement I've used
to try and pull one or the other or both locations depending on which
checkbox is checked;
SELECT t_Manager.Manager, t_Manager.Location, * FROM t_Manager WHERE
(((t_Manager.Location)=IIf([Forms]![f_Manager]![CB_JAX]=True,"JAX",Null))) OR
(((t_Manager.Location)=IIf([Forms]![f_Manager]![CB_FLO]=True,"FLO",Null)));
The SQL will pull the data like it should, but the combobox will not reflect
it.
Please help. Hope this makes sense.
Thank you in advance.
I have been trying to figure this out for hours and need some help please.
My DB has a table which contains 2 columns. Manager and Location.
Manager has multiple manger names and location describes where they are. so;
Manager Jackie is in Location FLO
Manager Deb is in Location FLO
Manager Rich is in Location JAX
Manager Sam is in Location JAX
I have a form with a combobox that has the rowsource set to pull from the
table. The SQL looks like this;
SELECT t_Manager.Manager, * FROM t_Manager;
This pulls all of the managers and works fine.
The form has 2 checkboxes. 1 for JAX and 1 for FLO.
What I am trying to do is, when either or both checkbox(s) is checked, I
want the managers for that location to show in the combobox. When the
checkbox(s) is unchecked, I do not want anything to show in the combobox. If
both checkboxes are checked, I want all of the managers to show in the
combobox.
I have tried adding the location to the SQL statement but the results will
not reflect how I want in the combobox. Here is the SQL statement I've used
to try and pull one or the other or both locations depending on which
checkbox is checked;
SELECT t_Manager.Manager, t_Manager.Location, * FROM t_Manager WHERE
(((t_Manager.Location)=IIf([Forms]![f_Manager]![CB_JAX]=True,"JAX",Null))) OR
(((t_Manager.Location)=IIf([Forms]![f_Manager]![CB_FLO]=True,"FLO",Null)));
The SQL will pull the data like it should, but the combobox will not reflect
it.
Please help. Hope this makes sense.
Thank you in advance.