+ Reply to Thread
Results 1 to 2 of 2

Parenthesis Help with SQL in VBA

Hybrid View

jo15765 Parenthesis Help with SQL in... 08-31-2012, 09:59 PM
Kyle123 Re: Parenthesis Help with SQL... 09-01-2012, 03:32 AM
  1. #1
    Forum Contributor
    Join Date
    06-18-2010
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    546

    Parenthesis Help with SQL in VBA

    I posted this question here ...but haven't gotten an answer yet. I know cross-posts are frowned upon so sorry guys

    http://www.mrexcel.com/forum/excel-q...lications.html


    I want to run this statement in VBA (which I know is a valid statement)
    ''''''Begin & Finish are input boxes that are receiving values as dates...
    WHERE tblnew.partName = 'Muffler' AND (tblnew.partEnteredDate Between " & Begin & " And " & Finish & ") 
    And tblnew.supervisorCheck IS NOT NULL AND tblnew.OrderDate IS NOT NULL AND tblnew.Ordered IS NOT NULL"
    The statement runs fine, but it doesn't return any results and if I run the query in SQL Server it returns results. That being said, I am thinking that I am missing some parenthesis around pieces of the Where clause....can someone assist?

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Parenthesis Help with SQL in VBA

    I've answered over there

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1