This code seems to be comming back with a null value. What I am trying to do is look up a code (primary key)on a table using values on a form and comparing them to the table. The table name is "Tariff" and the form name is "Tenders Form". The code is in the control source of the field on the form.
The terminal code,beginning date, ending date, and tariff rates: #2055 are all on the "tariff" table that I am doing the DLookUp on. If you can tell me if there is any thing wrong with the syntax of this code I sure would appreicate it. Or if this cannot be done this way I sure would appreicate some advice.
Thanks rbe
=DLookUp("[terminal code]","tariff","iif([TARIFF RATES: #2055] = [FORMS]![TENDERS FORM]![TARIFF LOOKUP],iif([FORMS]![TENDERS FORM]![DATE RECEIVED]> [BEGINING DATE] ,iif([FORMS]![TENDERS FORM]![DATE RECEIVED]< [ENDING DATE] , [terminal code],0)))"
The terminal code,beginning date, ending date, and tariff rates: #2055 are all on the "tariff" table that I am doing the DLookUp on. If you can tell me if there is any thing wrong with the syntax of this code I sure would appreicate it. Or if this cannot be done this way I sure would appreicate some advice.
Thanks rbe
=DLookUp("[terminal code]","tariff","iif([TARIFF RATES: #2055] = [FORMS]![TENDERS FORM]![TARIFF LOOKUP],iif([FORMS]![TENDERS FORM]![DATE RECEIVED]> [BEGINING DATE] ,iif([FORMS]![TENDERS FORM]![DATE RECEIVED]< [ENDING DATE] , [terminal code],0)))"