View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Martin Martin is offline
external usenet poster
 
Posts: 336
Default ADO Connect Access

You could use the VBA DatePart function: DatePart("ww", your date)

"gti_jobert" wrote:


Hi all,

I'm not sure if this is the right forum to post in as my Q may be
MSAccess related. I am using an ADO connection to retieve data from an
Access database using Excel VBA - this seems to be functioning properly
(I am able to get data as required).

My problem is modifying my SQL statement - currently I have;


Code:
--------------------

.Open "SELECT [Part No], [Batch Qty] FROM [" & TableName & "] " & _
" WHERE [Part No] = '01801-00408'", cn, , , adCmdText

--------------------


The above is just a test to see weather or not it worked (and it does).
I want to be able to select the data based on week numbers. The current
[Date] is in format '24/03/2006' - how do I modify this statement?

TIA, any ideas appreciated......and again someone here may know (bob??)


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=529538