3 Replies - 3531 Views - Last Post: 03 August 2012 - 05:57 PM

#1 mokhechen  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 27-July 12

calculate years from parameter [ date]

Posted 28 July 2012 - 08:23 AM

iam entering date , and number of year from form i want query to calculate who have more than number of years entered in textbox in the form
the query i made doesnt return it correctly
if any can help please

Attached File(s)


Is This A Good Question/Topic? 0
  • +

Replies To: calculate years from parameter [ date]

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3719
  • View blog
  • Posts: 5,991
  • Joined: 08-June 10

Re: calculate years from parameter [ date]

Posted 28 July 2012 - 09:01 AM

Post the query here. Most people aren't going to go download a random zip file to dig it up.
Was This Post Helpful? 0
  • +
  • -

#3 mokhechen  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 27-July 12

Re: calculate years from parameter [ date]

Posted 28 July 2012 - 09:14 AM

SELECT Table1.ID, Table1.Dof, ([Forms]![Form1]![Text0]-[Dof])/365.25 AS Expr1
FROM Table1
WHERE (((([Forms]![Form1]![Text0]-[Dof])/365.25)>[Forms]![Form1]![Text2]));

dosent returns years greater than the number entered in form1

This post has been edited by Atli: 28 July 2012 - 09:32 AM
Reason for edit:: Use [code] tags when posting code.

Was This Post Helpful? 0
  • +
  • -

#4 June7  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 104
  • View blog
  • Posts: 904
  • Joined: 09-December 08

Re: calculate years from parameter [ date]

Posted 03 August 2012 - 05:57 PM

I think it is because the query is treating the input of unbound Text2 as text. I changed the criteria to:

>Val([Forms]![Form1]![Text2])

This post has been edited by June7: 03 August 2012 - 05:58 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1