LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default Syntax for ADO Query String


John wrote:
I am trying to use ADO with an Excel spreadsheet. I have
done this successfully before, but I am having problems, I
think, because one of the fields I am using has a space in
it. (End Date). The string I am using is:

strquery = "Select * from [Sheet1$] where Property='" &
LookupP & "' and [End Date]='" & LookupEnd & "'"


What 'problems' e.g. an error message? I don't think the column name is
the problem because you've put it in brackets. Perhaps it is the value
of the LookupEnd variable e.g. is it a valid date format? Try
[End Date]='" & Format$(LookupEnd, "yyyy-mm-dd") & "';"

Jamie.

--

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Query Oracle syntax Jeff[_3_] Excel Discussion (Misc queries) 3 May 12th 07 03:06 AM
MS Query Oracle syntax Jeff[_3_] Excel Discussion (Misc queries) 0 May 11th 07 09:26 PM
Microsoft Query syntax Krish Excel Discussion (Misc queries) 0 October 7th 05 02:33 PM
MS Query - Alias syntax David P Excel Worksheet Functions 3 February 16th 05 09:29 AM
DB query syntax Mike Fogleman Excel Programming 5 December 19th 03 09:42 AM


All times are GMT +1. The time now is 03:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"