Results 1 to 3 of 3
  1. #1
    Plee is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2011
    Posts
    2

    Simple Select Query

    I've been trying to select only the records that have a "yes" for a field. The form that users input into has a combo box for that field, and that field in the underlying table is a lookup to an unrelated table containing ID and field name. There are three values: yes, no, unknown.

    For some reason when I run a select query for only the yes values, I also get the no values as well. The query looks something like this (dummy names for security purposes):

    SELECT tblTheTable.*
    FROM tblTheTable
    WHERE tblTheTable.TheField = Yes;



    Where am I going wrong?

    I have lots of other questions for advanced access developers that have the time for my questions... Thanks!

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    Where is the unrelated lookup table and field in your query?
    Is the field a text data type? If so , you may need "yes".
    But if you are querying a field in a different table, with a value from
    tblTheTable, you'll have to have someway to identify the "different" table.

  3. #3
    Plee is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2011
    Posts
    2
    The table and fields are in the same database as the table with all the contacts. The field is a text type and I am getting the correct records from the query. However, I am also getting the wrong records (one's with "no" in the field).

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

Similar Threads

  1. Simple Select query
    By sandlucky in forum Queries
    Replies: 3
    Last Post: 03-30-2011, 04:26 AM
  2. Simple Combo Box Multiple Select Question
    By ahamilton in forum Access
    Replies: 7
    Last Post: 03-17-2011, 01:38 PM
  3. need help with this simple query
    By dada in forum Programming
    Replies: 3
    Last Post: 08-20-2010, 07:08 AM
  4. simple query
    By taylorosso in forum Queries
    Replies: 1
    Last Post: 10-06-2009, 04:26 AM
  5. Replies: 2
    Last Post: 03-31-2009, 11:15 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