Guest_imported
New member
- Jan 1, 1970
- 0
hi,
I am having problem with this query in access.
I am trying to design a query which would compare 2 similar fields from 2 different tables and if the fields are not similar, take value from the one field.
Since this is a if, else type stuff, my friend suggested me to use IIf function but it does not run for some reasons known to you guys !!
I am putting the SQL statement here.. i appreciate your time and efforts,
thanks,
SELECT ERICFILE.AUTHOR, ERICFILE.TITLE, ERICFILE.PUBDATE, ERICFILE.RECORDNUM, ERICFILE.[Page Counts], ERICFILE.CENO, ERICFILE.DATO, ERICFILE.INST
FROM abbreviations RIGHT JOIN ERICFILE ON abbreviations.Abbreviations = ERICFILE.INST
WHERE (((ERICFILE.DATO)=[Enter Date:]) AND ((ERICFILE.INST)=IIf([ERICFILE]![INST]<>[abbreviations]![Abbreviations],[ERICFILE]![INST],[abbreviations]![INST])));
tech_head
I am having problem with this query in access.
I am trying to design a query which would compare 2 similar fields from 2 different tables and if the fields are not similar, take value from the one field.
Since this is a if, else type stuff, my friend suggested me to use IIf function but it does not run for some reasons known to you guys !!
I am putting the SQL statement here.. i appreciate your time and efforts,
thanks,
SELECT ERICFILE.AUTHOR, ERICFILE.TITLE, ERICFILE.PUBDATE, ERICFILE.RECORDNUM, ERICFILE.[Page Counts], ERICFILE.CENO, ERICFILE.DATO, ERICFILE.INST
FROM abbreviations RIGHT JOIN ERICFILE ON abbreviations.Abbreviations = ERICFILE.INST
WHERE (((ERICFILE.DATO)=[Enter Date:]) AND ((ERICFILE.INST)=IIf([ERICFILE]![INST]<>[abbreviations]![Abbreviations],[ERICFILE]![INST],[abbreviations]![INST])));
tech_head