Thanks for the Idea, Stephane, Its working now ..But, any guess why the DISTINCT keyword is not working here ..
On Thursday, 27 March 2014 9:55 PM, stephane cauvin <cauvin_stephane@yahoo.fr> wrote:
Yes we Can steel help
Any Way ------------------------------------------------> TIME PASS
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 -----From: Satheesh KumarSent: Wednesday, March 26, 2014 8:06 PMSubject: [ExcelVBA] Need help in queries when connecting MS access thru vbaHiI 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 > " & DateIn 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 SNo virus found in this message.
Checked by AVG - http://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 (5) |
----------------------------------
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
----------------------------------
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