Results 1 to 3 of 3
  1. #1
    TinaCa is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    87

    Extra ( in strWhere

    I am getting the following error message:


    In Operator without () in query expression '([companyCrewMember] In (46, 43) & [companyBillingDate] in (1).

    It appears to be missing a ) but where when it's not in my statement. The code is:

    StrWhere = Left(StrWhere, Len(StrWhere) - 2)
    StrWhere = "[CompanyCrewMember] In (" & StrWhere & ") & [CompanyBillingDate] In (" & BillDt & ")"

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    I think the issue is with the ampersand within the literal string. Try AND instead:
    StrWhere = "[CompanyCrewMember] In (" & StrWhere & ") AND [CompanyBillingDate] In (" & BillDt & ")"

    Ampersand is for concatenation, not boolean operation.
    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.

  3. #3
    TinaCa is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    87
    That worked - thank You

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

Similar Threads

  1. Multiple extra entries
    By EDEd in forum Forms
    Replies: 1
    Last Post: 01-30-2011, 10:59 AM
  2. Extra data
    By newtoAccess in forum Reports
    Replies: 14
    Last Post: 11-28-2010, 12:05 AM
  3. extra detail sections
    By kroenc17 in forum Reports
    Replies: 10
    Last Post: 10-08-2010, 11:35 AM
  4. strWhere VB Code
    By chhinckley in forum Access
    Replies: 5
    Last Post: 08-25-2010, 12:56 PM
  5. Extra space added
    By allenf in forum Forms
    Replies: 2
    Last Post: 07-25-2010, 06:57 AM

Tags for this Thread

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