Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Taking Form Dates between 2 variable dates and subtracting 90 days 1

Status
Not open for further replies.

Triacona

Technical User
Jun 11, 2009
462
0
0
GB
Hi everyone [smile]

I have created a few queries which runs off Form - ChooseDates
So when I run my report with 2 subreports, one which determines cases on hand at the begining of the quarter i.e 01/10/2008 to 31/12/2009
while the main query runs on the inputed dates within the form ChooseDates.
I want to take the dates from the ChooseDates Form and and within the apps received criteria put in those dates
subtracted by 90 days
, i.e:

Between ([Forms]![ChooseDates].[StartDate]-90) And ([Forms]![ChooseDates].[EndDate]-90)

but Access comes up with the following message:
This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables. (Error 3071)

What do I need to do?
Any help would be immensely appreciated [bigsmile]
kind regards
Triacona
 
What about this ?
Between ([Forms]![ChooseDates][!]![/!][StartDate]-90) And ([Forms]![ChooseDates][!]![/!][EndDate]-90)

You may also define the data type of your parameters.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Between (DateAdd("d", -90, [Forms]![ChooseDates].[StartDate])) And (DateAdd("d", [Forms]![ChooseDates].[EndDate], -90))

John
 
Dear PHV and JR Barnett,

Thank you so much for your help [bigsmile]
It now works!
The Formula that works is:

Between (DateAdd("d",-90,[Forms]![ChooseDates].[StartDate])) And (DateAdd("d",-90,[Forms]![ChooseDates].[EndDate]))

Thanks again [smile]
Kind regards
Triacona
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top