Thanks for the reply. Altough I was not able to use the code excactly as you wrote it I got DLookup to accept the date by using:
If IsNull(DLookup("HOLDDATE", "Holdings", "HOLDDATE = #" & Format(datadate, "mm/dd/yyyy") & "#" Then
As you see I have also changed DATE to HOLDDATE as sugested by...