Results 1 to 6 of 6
  1. #1
    morrisemigh is offline Novice
    Windows 10 Office 365
    Join Date
    Aug 2020
    Posts
    5

    Between parameter for age inputs

    I have a query where I am trying to output age ranges: My parameter is; Between [Low Age:] And [High Age:]



    The parameter, and query, work beautifully when the "High Age" figure is below 100. Once I put in a "High Age" of 100 or more the results are incorrect.

    Click image for larger version. 

Name:	Query.jpg 
Views:	9 
Size:	106.1 KB 
ID:	42847

    Any help?

  2. #2
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Once I put in a "High Age" of 100 or more the results are incorrect.
    not enough info. When that happens, what are some of the low age values? What are those results?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    morrisemigh is offline Novice
    Windows 10 Office 365
    Join Date
    Aug 2020
    Posts
    5
    All low values from 1 to 99 return correct results. When I make the "High Age" I get only results that are below the "Low Age".

    Here is a result page then the inputs are "60" and "103"

    Click image for larger version. 

Name:	Results.jpg 
Views:	9 
Size:	92.1 KB 
ID:	42848

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389
    For Their Age try
    Year(Now)-Year(DOB)
    or
    Year(Now())-Year(DOB)

  5. #5
    morrisemigh is offline Novice
    Windows 10 Office 365
    Join Date
    Aug 2020
    Posts
    5
    Year(Now)-Year(DOB) and Year(Now())-Year(DOB)

    Same results.

    The DateDiff calculation is correct. When I do not use the paramete,r all ages into the 100's are included. It must have something to do with the parameter.

  6. #6
    morrisemigh is offline Novice
    Windows 10 Office 365
    Join Date
    Aug 2020
    Posts
    5
    Solved: I had to go into the Parameter Tab, name the parameters and change their Data Type to integer.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Retain Selected Inputs on New Record
    By Torinjr in forum Forms
    Replies: 10
    Last Post: 05-17-2018, 06:37 PM
  2. Opening Certain Forms Depending on Inputs
    By thepigslayer in forum Access
    Replies: 4
    Last Post: 07-26-2015, 10:01 AM
  3. Rest Button for Form Inputs
    By Rustin788 in forum Forms
    Replies: 0
    Last Post: 11-25-2014, 07:53 AM
  4. Take Query Inputs From a Table
    By toonarmy in forum Queries
    Replies: 1
    Last Post: 11-13-2012, 09:01 PM
  5. Multiple inputs one result
    By ee12csvt in forum Queries
    Replies: 0
    Last Post: 09-11-2009, 03:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums