Results 1 to 6 of 6
  1. #1
    Reety is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2014
    Posts
    9

    Problem (Search Criteria)

    I have a "Property Search Screen" that links to a "query" as parameters are entered, different viewings of properties will come up that fit the parameters:



    Example, If i want to buy a house with a garden, the query would only show houses with gardens. Or if i enter a minimum price of 250,000 only houses that are 250,000+ will show.

    My question is: as the parameters are entered, my teacher wants an indicator displayed on the screen to show how many properties match the search criteria. This should update dynamically.

    Thanks for the help and your time
    Reety.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    The screen is a form.
    You add a field/text box control on the form.
    When you finalize the query based on your parameters and the values selected, you could
    count the records that qualify and place that number in the text box.

    This should give you a dynamic value that is dependent on the number of records that meet you search criteria.

    Good luck.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,648
    Try:

    Textbox in form footer section with expression: =Count(*)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    Reety is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2014
    Posts
    9
    Quote Originally Posted by orange View Post
    The screen is a form.
    You add a field/text box control on the form.
    When you finalize the query based on your parameters and the values selected, you could
    count the records that qualify and place that number in the text box.

    This should give you a dynamic value that is dependent on the number of records that meet you search criteria.

    Good luck.
    Quote Originally Posted by June7 View Post
    Try:

    Textbox in form footer section with expression: =Count(*)
    Thank you, this has helped. I initially started with this, but i'm stuck on the formula like really really badly, is there any possible way someone could look at my database and help me out? My formula is looking like this:

    =DCount("*","Instructor","Charge>=MinCharge AND Charge<=MaxCharge
    AND [Max Hours]>=MinHours AND Weekends=WETick
    AND Gender Like GenderCombo
    AND Central Heating=CentralHeatingBox")

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    I don't see why you need to repeat all possible parameters.
    I could be very wrong but my first approach would be

    =Dcount("*","yourQueryName")

    You will dynamically build a query based on parameters/values selected.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,648
    You can attach file to post. Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 2
    Last Post: 10-31-2012, 11:52 AM
  2. Replies: 2
    Last Post: 06-14-2010, 03:25 PM
  3. query problem i have a problem wi
    By maxx3 in forum Queries
    Replies: 0
    Last Post: 06-29-2009, 02:29 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