Re: dateadd embedded in dlookup problem
- From: "crusty via AccessMonster.com" <u26101@uwe>
- Date: Sun, 03 Sep 2006 22:25:02 GMT
Thanks for the response John,
Unfortunatly, that still doesn't work.
I have confirmed that
dateadd('d',17, [mdate] )
works ok, and all the rest of the querie works ok,
It just seems to be the dateadd within the Dlookup having [mdate]
outside of the inverted commas that seems to be the problem.
I've tried putting mdate inside the inverted commas, but access complains.
[mdate] has been declared a date/time in parameters.
Thanks
Adrian
John Spencer wrote:
Try the following. You need to add the "#" delimiter to the criteria so MDate
will be interpreted as a date.
Expr3: DLookUp("approved","tblLeave"
,"EmployeeID=5 AND [Start Date]<= dateadd('d',17,#" & [mdate] & "#) AND
Day([End Date])>=18")
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200609/1
.
- References:
- dateadd embedded in dlookup problem
- From: crusty
- Re: dateadd embedded in dlookup problem
- From: John Spencer
- dateadd embedded in dlookup problem
- Prev by Date: Re: VB Updating Appointments from Access Query
- Next by Date: RE: choronologically
- Previous by thread: Re: dateadd embedded in dlookup problem
- Next by thread: Re: dateadd embedded in dlookup problem
- Index(es):