Results 1 to 2 of 2
  1. #1
    jlgray0127 is offline Competent Performer
    Windows 2K Access 2003
    Join Date
    Oct 2011
    Location
    Central Illinois
    Posts
    185

    Forms and filtering with text boxes

    I am trying to use an unbound form to enter criteria to filter a query.
    I am using this SQL code.

    SELECT TOP_LVL_IDENT, PSA
    FROM PFEP_RACK_AUDIT_INQ;


    WHERE (((TOP_LVL_IDENT)=[Forms]![PFEP_SWITCHBOARD]![INQ_ARRANGEMENT] Or IsNull([Forms]![PFEP_SWITCHBOARD]![INQ_ARRANGEMENT])) AND ((PSA)=[Forms]![PFEP_SWITCHBOARD]![INQ_PSA] Or (IsNull([Forms]![PFEP_SWITCHBOARD]![INQ_PSA]))));

    I am getting an error from my query though. It is "Characters found after end of SQL statement. Why is this? How do I get this to work.

    I want to be able to enter criteria in one, or both text boxes, and get a result from my query.
    Thank you!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The error is due to the semi-colon at the end of the FROM clause.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 9
    Last Post: 06-04-2014, 10:45 AM
  2. Filtering Forms
    By Iggsy in forum Forms
    Replies: 6
    Last Post: 11-23-2011, 01:01 AM
  3. Replies: 5
    Last Post: 09-02-2011, 03:44 PM
  4. Error with filtering subform using 2 combo boxes
    By dharmacloud in forum Forms
    Replies: 4
    Last Post: 08-22-2011, 10:46 AM
  5. Filtering options using Cascading Combo boxes
    By Lincoln in forum Database Design
    Replies: 3
    Last Post: 07-15-2011, 08:25 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