Using date function with inline prompt

J

Jeff

I am using the Now() function and trying to use a variable input to go back a
couple of days for checking dates. In the Date Column, I am using >Date() -
3 to go back 3 days as a hard code. When I change it to a inline prompt it
does not work ie. > Date() - [Enter number of days before now]. How best can
I get this to work?
 
J

John Spencer

My first choice would be to use the DateAdd function
DateAdd("d",-[Enter number of days before now],Date())

Or force the parameter value type
Date() - CInt([Enter number of days before now])

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
I am using the Now() function and trying to use a variable input to go back a
couple of days for checking dates. In the Date Column, I am using >Date() -
3 to go back 3 days as a hard code. When I change it to a inline prompt it
does not work ie. > Date() - [Enter number of days before now]. How best can
I get this to work?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top