Results 1 to 4 of 4
  1. #1
    jtm013 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Aug 2014
    Posts
    117

    Query results based on checked record.

    Hello everyone and thanks in advance for any and all assistance!

    So here is the problem. I have a table which lists an approved group of people to make changes.
    The way the database is set up now. We cannot remove out of date names (we have one person who retired in 1995 still on the list) from the table because it will mess up the data validation in place on past records which have those people's names on them.
    My plan is to create a new source for the combo box that uses these names.
    This source would be a query based off the Approved Group Table.


    So here is what I did. I put a check box on the approved group table the field is labeled "Active"
    If the person is active the box gets checked.
    I now have a query which is supposed to only select the checked records...but I don't know how to tell the query to do that apparently.
    Here is what I have now.

    Field: Employee Number First Name Last Name Active
    Table: Tbl_Approved_Group Tbl_Approved_Group Tbl_Approved_Group Tbl_Approved_Group
    Sort:
    Show: Checked Checked Checked
    Criteria: "-1"
    Or:

    When I run this I get an error message which says, "Data type mismatch in criteria expression."

    Any and all help is appreciated thank you!

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    What data type is Active? I use a Number as the Data Type and use 1 Or -1 as the Validation Rule with a Default of -1
    1 is Yes,- 1 is No.

    HTH

  3. #3
    jtm013 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Aug 2014
    Posts
    117
    Hello,

    Active is a number field. I changed it so that the default vale is -1.
    And Yes=1 No= -1, but the Query still comes back with "Data type mismatch in criteria expression."

  4. #4
    jtm013 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Aug 2014
    Posts
    117
    Nevermind...I figured it out. I had the -1 in quotes as soon I took away the quotes it works fine.
    Thanks for your help!

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

Similar Threads

  1. Replies: 2
    Last Post: 02-02-2014, 07:19 PM
  2. Create Message Box based on query results
    By stanley721 in forum Queries
    Replies: 7
    Last Post: 02-14-2013, 10:04 AM
  3. Replies: 3
    Last Post: 01-24-2013, 08:16 PM
  4. Replies: 4
    Last Post: 03-02-2012, 08:41 AM
  5. Open form based on query results
    By RobbertH in forum Queries
    Replies: 1
    Last Post: 02-10-2010, 08:13 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