Hello and thank you in advance for your assistance in helping me resolve a problem I am encountering in an Access 2010 query.
I have created a query where a field uses this expression --
Source: IIf([Field 1]<>"" Or [Field 2]<>"","Answer A","Answer B") and this works fine.
Note: Some of the records have empty strings in fields 1 and 2.
When I created a new query where I am joining one Query (Query 1) to another Query that has the expression above (Query 2) I used the relationship Include ALL records from Query 1 and only those records from Query 2 where the joined fields are equal (the joined fields are numeric and ther are no null values in the joined fields). When I use the field that has the expression, it applies that expression to all of the records in Query 1 as well as Query 2. I thought that since I am requesting only those records from Query 2 where the joined fields are equal, I would only get expression results for the Query 2 records and those records in Query 1 which are not joined by the relationship would not have expression results.
So....
What I want to do is take the results of the expression and place them in another field in Query 2 but as the text values of the result of the expression.
I do not yet know VBA or SQL.
I have created a query where a field uses this expression --
Source: IIf([Field 1]<>"" Or [Field 2]<>"","Answer A","Answer B") and this works fine.
Note: Some of the records have empty strings in fields 1 and 2.
When I created a new query where I am joining one Query (Query 1) to another Query that has the expression above (Query 2) I used the relationship Include ALL records from Query 1 and only those records from Query 2 where the joined fields are equal (the joined fields are numeric and ther are no null values in the joined fields). When I use the field that has the expression, it applies that expression to all of the records in Query 1 as well as Query 2. I thought that since I am requesting only those records from Query 2 where the joined fields are equal, I would only get expression results for the Query 2 records and those records in Query 1 which are not joined by the relationship would not have expression results.
So....
What I want to do is take the results of the expression and place them in another field in Query 2 but as the text values of the result of the expression.
I do not yet know VBA or SQL.