Results 1 to 5 of 5
  1. #1
    nanderson is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2019
    Posts
    6

    Filtering data on a form using a form field


    I have a form that has a field called Status. This field is pulled from a table called Assets. I am wanting the form to only display the status of In Service. Would I do this via the table or via the form and how would I go about doing this. I have tried using the Row Source option in the field properties, but that did not seem to work as the form is still displaying all of the statuses.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    What is the rowsource of the form currently?
    You could use a query for rowsource along this line:
    Code:
    Select * from Assets where status = "In Service";

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    FYI you probably both meant Record Source, not row source.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

  5. #5
    Join Date
    Apr 2017
    Posts
    1,673
    In form's open event set form's Filter property to "[Status] = 'In Service'", and FilterOnLoad property = Yes;
    Optionally add an unbound combo to form, with RowSource e.g. "1; In Service; 2; Out Of Service", bound to 1st column. AfterUpdate event of control resets RowSource of Status control, and requeries it.

    And you can consider having Status field values 0 and 1 smallint values instead string ones. On form you can have combo as bound control, and current strings as 2'nd column (dispayed one) values in RowSource.

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

Similar Threads

  1. Filtering form data with check boxes
    By Bkper087 in forum Access
    Replies: 1
    Last Post: 07-15-2019, 11:33 PM
  2. Data Filtering in Continuous Form!
    By cap.zadi in forum Forms
    Replies: 9
    Last Post: 11-25-2018, 05:31 AM
  3. Filtering Data in a Subform for a form
    By mchadwick in forum Forms
    Replies: 1
    Last Post: 01-02-2015, 01:54 PM
  4. Data filtering on a form
    By Sam4 in forum Forms
    Replies: 3
    Last Post: 11-23-2011, 05:14 PM
  5. Unbound form for data filtering
    By alliandrina in forum Access
    Replies: 7
    Last Post: 05-21-2011, 05:19 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