Share via

setting minimum and maximum values in a query

Anonymous
2013-03-29T07:49:22+00:00

Hi,

I came across this yesterday, and I don't know how to go about this.

I have a query set up in my database which allows me to set parameters to return certain properties. The Criteria are set as Between [minimum rent] and [Maximum Rent], which allows me to selct available properties within a given client budget.

Yesterday I entered a value which was not in the database, and I got no return.

So, I would like to set the query up in such a way that I can enter any value, regardless of it actually being in the rentals tabel or not, and still get a return of existing properties within the set parameters.

this is the actual happening:

a potential client is looking for rental property with a rent price of between 375 and 425 per month. As it happens, there are no properties available with a rent of 375. What is available is 370 or 385. If I key 375 in as the first criterium, I get no returns. If I key in 370 as the first criterium, I get all 29 properties with a rental value between 370 and 425, of course that includes properties between 375 and 425 a month as well.

How do I get access to accept "375" as a minimum, and take the guess work out of the job while reducing the choices of property to within the criteria set?

Thank you

Eleanna

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2013-04-06T12:02:42+00:00

    Sorry for not getting back sooner... One of the kids figured out what I did arong and fixed it. Working perfect now. Thanks for repsonding.

    Eleanna

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2013-04-06T12:01:50+00:00

    Sorry for not getting back sooner... One of the kids figured out what I did arong and fixed it. Working perfect now. Thanks for repsonding.

    Eleanna

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2013-03-29T13:38:52+00:00

    That should not be a problem.  Post a Copy/Paste of your query's SQL view so we can try to figure this out.

    Was this answer helpful?

    0 comments No comments
  4. ScottGem 68,830 Reputation points Volunteer Moderator
    2013-03-29T12:19:54+00:00

    Can you show us the SQL. 

    This shouldn't matter that the rent was not in the table. For example: If the criteria for the Rent column was BETWEEN 375 AND 425, then it should return all properties with a rental between those amounts. It should not matter that there are no properties with a rental of 375.  Is rental a numeric value?

    By the way I wouldn't use a parameter prompt for this. I would use a form to enter the criteria. This works because you can reference a value in a control on an open form using the syntax:

    Forms!formname!controlname

    Was this answer helpful?

    0 comments No comments