Results 1 to 5 of 5
  1. #1
    ayupchap is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Dec 2013
    Posts
    107

    Query to leave out records if certain one selected?

    Hi all wondering if you could help me please, I have got a lot of help from this forum on a number of issues recently and hope you won't let me down with this one.



    I have a number of records which make use of a drop-down menu, this all works fine but how do I make a query with all the data which I can ask it to not include one of the options in one of the dropdowns so it leaves out the entire record for that person who had that option?

    For example lets say I need to export a list of students who are not well to send a text out to them. Unfortunately the list also contains sent home as an option in the same list and I don't want to text those people, how do I make a query that will miss out those records which have sent home as an option allowing an export of students who are listed as not well?

    I would rather have a query that eliminates one option rather than select an option as more options might get added to the drop-down list at a later date.

    Thanks for any help

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Do you have a field that represents the status of the student? Is there a "Sent Home" status field and a "Not Well" status field?

  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,770
    What is this combobox for? Is it for data entry to record (and is bound to field)? Or is it just for input of filter criteria (and is NOT bound to field)? What are the values selected by this combobox - 'sent home', 'back to class', etc?

    Options for using inputs as filter criteria are:

    1. parameterized query that refers to the controls on form
    http://datapigtechnologies.com/flash...earchform.html
    This query can be the RecordSource for a form or report
    http://datapigtechnologies.com/flash...mtoreport.html
    http://datapigtechnologies.com/flash...tomfilter.html

    2. use VBA to construct filter criteria and apply to form or report
    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
    ayupchap is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Dec 2013
    Posts
    107
    Oh great thanks for the links. I will check those out.

  5. #5
    ayupchap is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Dec 2013
    Posts
    107
    OK so I worked out a way of doing it by saying ="Something" or "something else" and just leaving out Not Well. Thanks for the help

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

Similar Threads

  1. To make an invoice with selected records
    By mercapto in forum Database Design
    Replies: 5
    Last Post: 10-04-2012, 12:49 PM
  2. HELP for updating selected records
    By explorer19 in forum Programming
    Replies: 7
    Last Post: 06-01-2011, 01:29 PM
  3. Replies: 7
    Last Post: 02-25-2010, 12:32 PM
  4. help need on query report on who is on leave
    By islandboy in forum Forms
    Replies: 10
    Last Post: 08-17-2009, 12:13 PM
  5. Replies: 0
    Last Post: 02-15-2009, 09:14 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