Results 1 to 3 of 3
  1. #1
    mjwillyone is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010
    Posts
    11

    2007 View Only Limited Records

    Ok .. so I know that I have an older version of Access (2007) but we paid for it years ago and have never paid since and it works great.

    I have a form that opens when I open our Access software. This form displays all employees (current and those no longer with us.)

    Is there a way that I can set the form to show ONLY current employees if I have a field that provides that info?



    Also, is there a way to display when I want to ONLY those employees that are gone?

    Thank you so much!
    Mike

  2. #2
    Minty is online now VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    Assuming you have a DateLeft or something simlar look at the query that populates the form and add some criteria to it - something like (in the SQL view)

    Where DateLeft Is Null

    Or in the query designer put Is Null in the criteria section under that field.

    The opposite applies to see employees that have left:

    Where DateLeft Is Not Null
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    Join Date
    Apr 2017
    Posts
    1,673
    As minty said, you must have some field in your employees table, which indicates, is the employee working or not. Having the date of employee leaving is arguably the best.

    Instead adding WHERE clause to query, I think the better solution is to set the filter criteria for form. E.g. you base your form on full employees table or o full query (all employees you had over time);
    In OnOpen event of the form, you set default filter property for form (e.g. displayed are only employees currently employed, and activate the filter. Like
    Me.Filter = "DateLeft Is Null"
    Me.FilterOn = True

    You can add an unbound combo e.g. into header of form, where user can select, are displayed employees with DateLeft Is Null or DateLeft Is Not Null. The combos Change event will reset the filter condition for form according the selection the user made.

    In case you allow users to select the form filter through session, and you have on form a combo to activate a specific employee, you have the filter selection combo also to edit the RowSource property of employee selection combo.

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

Similar Threads

  1. Sharepoint Linked Table Limited to 200 Records
    By Steven.Allman in forum SharePoint
    Replies: 0
    Last Post: 10-16-2021, 09:34 PM
  2. Replies: 3
    Last Post: 04-10-2017, 08:34 AM
  3. View only specific records in form view
    By drnld in forum Access
    Replies: 5
    Last Post: 07-22-2014, 12:21 PM
  4. Replies: 1
    Last Post: 11-26-2013, 01:41 AM
  5. Cannot view all records in form view
    By thar2hag in forum Forms
    Replies: 1
    Last Post: 11-01-2012, 08:43 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