View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
brucelim80 brucelim80 is offline
external usenet poster
 
Posts: 1
Default SQL <SELECT with condition


hi
Can anyone help me with this problem? i am a newbie for VBA
programming.


My excel cell look like this
A B
1 user description
2 83 london
3 84 usa
4 45 italy
5 84 Rome

The sheetname is called data


How do i write an SQL statement to Extract the description where the
user is 84

SELECT * FROM [data$] Where user='83'

I have an error when executing with ADODB.Recordset: " Data type
mismatch in Criteria Expression"
Runtime error ' -2147217913 (80040e07)'

Thank you


--
brucelim80
------------------------------------------------------------------------
brucelim80's Profile: http://www.excelforum.com/member.php...o&userid=32244
View this thread: http://www.excelforum.com/showthread...hreadid=520460