Well I thought I had got it with this
intYear = DLookup("[lngCurYear]", "tblCurrentYear", """ & Format(Me.txtRecD, 'yyyymmdd') & Between & Format(CDate([dtmCurYearStart]), 'yyyymmdd') & And & Format(CDate([dtmCurYearEnd]), 'yyyymmdd') & """)
since it compiled and ran OK with the first test I...