View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
gti_jobert[_82_] gti_jobert[_82_] is offline
external usenet poster
 
Posts: 1
Default VBA ADO SQL Query Problem


Hi thanks for your reply,

I have tried your formatting of my sDate and eDate but it still give me
the error; I did a printout of the SQL query to view the variables as
shown below;

SQL:

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

'SQL select data
.Open "SELECT [Date], [Part No], [Batch Qty] FROM [" & TableName & "] " & _
" WHERE [Date] = '" & Format(sDate, "dd/mm/yyyy") & "'", cn, , , adCmdText

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


Echo SQL:
SELECT [Date], [Part No], [Batch Qty] FROM [Speed Fastener Packing]
WHERE [Date] = '28/03/2006'

Perhaps I should be formatting the [Date] column in the Db - but how
would I go about this?

TIA


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