Date on Form

Mark.Innes

Registered User.
Local time
Today, 02:53
Joined
Dec 10, 2003
Messages
15
This should be an easy one but can't get it to work....

I have a query that pulls the date from the form. Simple enough

I have a 2nd query that I need to be a week prior to the "from" and "to" date on the form. I have set up these extra date fields on the form and have said in the control source..

=[FromDate]-7
=[ToDate]-7

But for some reason these are not working back 7 days from the dates entered and it gives an error. What am I doing wrong?

Help please
 
Code:
=DateAdd("d", -7, CDate([FromDate]))
=DateAdd("d", -7, CDate([ToDate]))

Does that work?
 
Just about thank you,

The format is coming out like this as my date format includes the time

26/01/20 04:**

Should be 26/01/04 00:00

What do I need to add for this please?
 

Users who are viewing this thread

Back
Top Bottom