C
Chris Buchanan
I have a subform that is going to be filtered using the the results of a
field on a different form. I have been doing this for years and it works
well. However, I've changed what I'm doing a bit and now I can't get the
query to work. I've looked around the forums, but haven't found anything yet
that seems to answer my question.
I have a look-up table (LUT) with a field [Project]. However, this LUT may
not have entries for every single project for which I store data. What the
LUT does contain is a set of default values where [Project]= "zgene".
The form with the combo box ([select_project]) that provides a parameter to
multiple queries through-out my database shows every single project contained
in the database, including a null option.
The new sub-form uses the parameter to filter the LUT, where the LUT is used
to provide a value for a field in the sub-form. Now, I've been able to get
two of the three results that I require with a simple IIf statement, but not
the third. Here are the three results I think I need:
1. a null selection filters the "zgene" project values.
2. value for [select_project] is not present in the LUT and the values for
"zgene" are filtered.
3. value for [Select_project] is present in the LUT and these values are
filtered.
I can get results 1 and 3, but not 1, 2, and 3. If anyone has a hint of how
to do this I would appreciate it.
On the other hand if this makes no sense of all I'll understand too. Thanks
for any insights you may be able to offer.
field on a different form. I have been doing this for years and it works
well. However, I've changed what I'm doing a bit and now I can't get the
query to work. I've looked around the forums, but haven't found anything yet
that seems to answer my question.
I have a look-up table (LUT) with a field [Project]. However, this LUT may
not have entries for every single project for which I store data. What the
LUT does contain is a set of default values where [Project]= "zgene".
The form with the combo box ([select_project]) that provides a parameter to
multiple queries through-out my database shows every single project contained
in the database, including a null option.
The new sub-form uses the parameter to filter the LUT, where the LUT is used
to provide a value for a field in the sub-form. Now, I've been able to get
two of the three results that I require with a simple IIf statement, but not
the third. Here are the three results I think I need:
1. a null selection filters the "zgene" project values.
2. value for [select_project] is not present in the LUT and the values for
"zgene" are filtered.
3. value for [Select_project] is present in the LUT and these values are
filtered.
I can get results 1 and 3, but not 1, 2, and 3. If anyone has a hint of how
to do this I would appreciate it.
On the other hand if this makes no sense of all I'll understand too. Thanks
for any insights you may be able to offer.