none
Criteria showing only true values RRS feed

  • Question

  • I have many forms that select employees to track who created the record. I have it set so that only employees who have "Active" = "True" show up in list. My problem is that if an employee is no longer active their name will not show up on the form. How would I code it that when the list is viewed it shows only those active but if the employee was already selected it still shows their name?

    Hope that makes sense

    Thanks

    Wednesday, November 6, 2019 6:28 PM

All replies

  • How would I code it that when the list is viewed it shows only those active but if the employee was already selected it still shows their name?

    Hi JKriv,

    Something like:  " … WHERE (Active) OR (Employee_id = " & selected_employee_id & ")"

    Imb.

    Wednesday, November 6, 2019 6:46 PM
  • Take a look at ActiveEmployees.zip in my public databases folder at:

    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169

    Note that if you are using an earlier version of Access you might find that the colour of some form objects such as buttons shows incorrectly and you will need to amend the form design accordingly.  

    If you have difficulty opening the link, copy the link (NB, not the link location) and paste it into your browser's address bar.

    This little demo file illustrates exactly what you are trying to achieve.  Note that in continuous forms view a 'hybrid' control must be used, not a simple combo box.


    Ken Sheridan, Stafford, England

    Wednesday, November 6, 2019 11:38 PM