I have a query that I want to use to create a calculated field involving a date. I have a "CalibrationDate" field, a "Frequency" field which is a number, and a "Period" field which is a lookup field that looks at a table that contains 2 fields "Period1" which contains records like Days, Weeks, Months or Years, and the second field is "PeriodCode" Which contains correlating records such as d, ww, m, or yyyy which are what is used for a date add function.
If you are still with me, for my calculated field I used
CodeLookup: DLookUp("[PeriodCode]","tblFrequency",[Period1]=[Period])
I cannot get this to pull "d" when the record has "Days" for the [Period] field and so on. When I remove the last part of the DLookup (the part that you give the criteria) it shows "yyyy" which is the last record in the table so I know that it is working I just have a problem with my criteria portion. Any help is greatly appreciated!