Results 1 to 9 of 9
  1. #1
    Gee is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Feb 2013
    Posts
    31

    User to enter parameters between two numbers NOT dates

    I have an Access db where one of the fields is "Population".
    I need the user to enter a start number and end number, so they can get, say the models with a "Population" between 10 and 1000.
    I see answers all over, but they either refer to start and end dates, or the numbers are in the code, not in an input box.
    Thank you for your help.

  2. #2
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2003
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254
    Gee -

    One easy way would be to...

    Create a query that includes the "Population" field. In design view, add:

    >=[Start Number?] And <=[End Number?]

    to the criteria row of the Population column. Then open the query and you will be prompted for a Start Number and then an End Number, fill in both and the query should return records that are between those parameters.

    All the best,

    Jim

  3. #3
    Gee is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Feb 2013
    Posts
    31
    I thought that would work also, but it only gave me data under the 2nd input, the first input it ignores.
    Any other suggestions?
    thanks!

  4. #4
    Gee is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Feb 2013
    Posts
    31
    I just realized...I imagine it makes a difference if it's "varchar" rather than "numeric"?
    HAH!

  5. #5
    Gee is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Feb 2013
    Posts
    31
    OK, I just went through the process of changing it to numeric and it still doesn't work...no data is returned.
    Help?
    Last edited by Gee; 02-05-2013 at 12:06 PM. Reason: Fixed

  6. #6
    Gee is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Feb 2013
    Posts
    31
    I did a bit more tweeking and it worked!

    Thank you so much for your help.

    >=[Start Number?] And <=[End Number?]

  7. #7
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2003
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254
    Gee -

    Glad you got it working. Please mark thread as Solved.

    Happy to help,

    Jim

  8. #8
    Gee is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Feb 2013
    Posts
    31
    I cant' see where to mark as solved.

  9. #9
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2003
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254
    Gee -

    In the green bar just below thread title, select Thread Tools, then Mark as Solved.

    All the best,

    Jim

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

Similar Threads

  1. Parameters for Dates
    By mike02 in forum Queries
    Replies: 4
    Last Post: 07-09-2012, 10:49 AM
  2. auto enter sequential numbers
    By normie in forum Access
    Replies: 5
    Last Post: 05-25-2012, 10:38 AM
  3. Replies: 1
    Last Post: 11-29-2011, 08:43 AM
  4. Enter Wildcards for Date Parameters
    By P5C768 in forum Queries
    Replies: 3
    Last Post: 05-18-2011, 01:42 PM
  5. Form to enter all parameters in a macro
    By jackthedog in forum Access
    Replies: 0
    Last Post: 05-05-2009, 04:47 PM

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