Results 1 to 2 of 2
  1. #1
    NDBCaccess is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2010
    Posts
    1

    form filter using form text box value

    Help please



    I have an Access 2007 d/b which has a main table called Properties, which has 3 fields called UPRN, PropertyType and PropertyStatus

    Linked to Properties in a 1-to-1 relationship is a table called Addresses, which has the usual address fields

    I have a form called f_PropertyDetails which shows the 3 Properties fields, and the fields from the related Addresses record

    All working fine, and as I click through the properties the address details change

    I have a Text Box called t_type_store on the form which I want the user to be able to enter a property type into, and then the user clicks a button which will apply a Form Filter and only show the Properties records where the field Type is equal to the value entered in t_type_store

    Then the user can enter a different property type into t_type_store and click the button, which applies the same Form Filter, only this time showing the Properties records where the field Type is equal to the new value in t_type_store

    I can get a Form Filter to work where I code a specific value into the Where Condition of the macro i.e. [PropertyType]="Residential"

    And I could create 5 buttons, each with a different value, and this would work - but it does seem to be a lot of duplication

    Then I changed the Where Condition in the macro to [PropertyType]=[Forms]![f_PropertyDetails]![t_type_store]

    This seems to work the first time I enter a value into t_type_store and click the button, but when I change the value in t_type_store and click the button it does not get the records matching the new value

    It is as if the first value used in the filter is retained and never updated

    Any help greatly appreciated

  2. #2
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    this is not an exact answer to your question, but it will show you a technique that you can adapt to your situation

    http://www.datapigtechnologies.com/f...tomfilter.html

    Alan

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

Similar Threads

  1. Replies: 2
    Last Post: 11-25-2013, 10:56 AM
  2. how to set up filter in form
    By Brigitt in forum Forms
    Replies: 1
    Last Post: 10-28-2010, 07:39 AM
  3. Replies: 15
    Last Post: 09-18-2010, 01:19 PM
  4. Replies: 1
    Last Post: 07-29-2010, 05:39 PM
  5. launching form with filter from other form
    By iankerry in forum Programming
    Replies: 4
    Last Post: 01-19-2010, 11:05 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