Hello all,
I'm having an issue with obtaining some data from a table that falls between a date range. The code is as follows:
CustDiscount = DLookup("[CustDisc]", "TblDiscounts", "[CustID]='" & CustomerID & "AND [EffectiveDate]< " & OrderDate & " AND [ExpirationDate]> '" & OrderDate & "'")
Essentially I would like to be able to obtain a number by looking up from a table by comparing a date range and an identifier and use that number as a variable.
Any feedback or thoughts on how to obtain the data out of the table would be greatly appreciated.
Thanks
I'm having an issue with obtaining some data from a table that falls between a date range. The code is as follows:
CustDiscount = DLookup("[CustDisc]", "TblDiscounts", "[CustID]='" & CustomerID & "AND [EffectiveDate]< " & OrderDate & " AND [ExpirationDate]> '" & OrderDate & "'")
Essentially I would like to be able to obtain a number by looking up from a table by comparing a date range and an identifier and use that number as a variable.
Any feedback or thoughts on how to obtain the data out of the table would be greatly appreciated.
Thanks