I am trying to use Dlookup in a report page footer to populate a text box. The Dlookup statment works great when the criteria is hard coded as the following examples demonstrates.
=DLookUp("[Points]","[Winning Teams Table]"," [Date]=#2002/08/15# and [id] =4")
When the hard coded date is replace with a variable the statement returns the first occurance of id in the table.
=DLookUp("[Points]","[Winning Teams Table]"," [Date]=datevar and [id] =4")
Does anyone have any ideas why this might be happening. I have check the variable datevar and it does contain the value required?
Thanks for your help.
=DLookUp("[Points]","[Winning Teams Table]"," [Date]=#2002/08/15# and [id] =4")
When the hard coded date is replace with a variable the statement returns the first occurance of id in the table.
=DLookUp("[Points]","[Winning Teams Table]"," [Date]=datevar and [id] =4")
Does anyone have any ideas why this might be happening. I have check the variable datevar and it does contain the value required?
Thanks for your help.