Access 2016

%3CLINGO-SUB%20id%3D%22lingo-sub-870649%22%20slang%3D%22en-US%22%3EAccess%202016%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-870649%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20whenever%20i%20am%20writing%20criteria%20while%20creating%20query%26nbsp%3B%20'Between%20Date()%20and%20Date()%20%2B30'%26nbsp%3Bgetting%20message%20'Undefined%20function%20in%20the%20expression'%20in%20access%202016.%20However%20same%20is%20taken%20by%20access%202007%20version.%20Kindly%20advice.%3C%2FP%3E%20%20%26nbsp%3B%20%26nbsp%3B%3CP%3E''%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-870649%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAccess%20Web%20Database%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-881060%22%20slang%3D%22en-US%22%3ERe%3A%20Access%202016%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-881060%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F413725%22%20target%3D%22_blank%22%3E%40Arun_Kumar%3C%2FA%3E%26nbsp%3BI%20believe%20the%20best%20way%20to%20guarantee%20dates%20show%20up%20is%20to%20use%20%26lt%3B%2C%20%26gt%3B%3D%2C%20instead%20of%20Between%20or%20AND.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-888820%22%20slang%3D%22en-US%22%3ERE%3A%20Access%202016%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-888820%22%20slang%3D%22en-US%22%3EI%20think%20you%20will%20be%20OK%20if%20you%20add%20parenthesis%20around%20the%20second%20Date()%20and%20the%20%2B30.%20Like%20Between%20Date()%20and%20(Date()%20%2B30)%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

Hi whenever i am writing criteria while creating query  'Between Date() and Date() +30' getting message 'Undefined function in the expression' in access 2016. However same is taken by access 2007 version. Kindly advice.

 
 

''  

2 Replies
Highlighted

@Arun_Kumar I believe the best way to guarantee dates show up is to use <, >=, instead of Between or AND.

Highlighted
I think you will be OK if you add parenthesis around the second Date() and the +30. Like Between Date() and (Date() +30)