Kamis, 27 Maret 2014

Re: [ExcelVBA] Need help in queries when connecting MS access thru vba

 

Yes we Can steel help 

 
             Any Way  ------------------------------------------------>   TIME PASS

               a)   Active_Date       b)    Date           c)   Actual_TDATE
 
 


 1 )     Is it the wrong Something ???         There are 2  "Where" There  !!!

        ssql = "select * from Table1 where where Active_Date < " & Date & " and Actual_TDATE > " & Date


 2 )  Try this  instead
 
          ssql = "select * from Table1  Where    Date  Between   Active_Date AND    TDATE


 
  Bye

 @++SC




Le , stephane cauvin <cauvin_stephane@yahoo.fr> a écrit :



Le Mercredi 26 mars 2014 21h40, David Smart <smartware.consulting@gmail.com> a écrit :
 
What exactly does ssql end up containing?  You need to print it out so we can see what's actually gone to Access.
 
What SQL statement do you use in Access to select the required information?
 
Regards, Dave S
 
----- Original Message -----
Sent: Wednesday, March 26, 2014 8:06 PM
Subject: [ExcelVBA] Need help in queries when connecting MS access thru vba

Hi
 
I am connecting to the MS access from macro, the query I written is,
 
ssql = "select * from Table1 where where Active_Date < " & Date & " and Actual_TDATE > " & Date
 
In the Table1, I've two date fields as Active_Date(from date) & Actual_TDATE(to date), I want to pull only the active rows where the system date should fall between from and to date.
 
Tried with the above query, but not fetching any data. Please tell some alternate queries.
 
Regards,
Satheesh Kumar S

No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1432 / Virus Database: 3722/6746 - Release Date: 03/25/14




__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar