Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
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 & "'" Would anyone be able to tell me what I am doing wrong? I have also tried several different ways. THANKS! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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. -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
MS Query Oracle syntax | Excel Discussion (Misc queries) | |||
MS Query Oracle syntax | Excel Discussion (Misc queries) | |||
Microsoft Query syntax | Excel Discussion (Misc queries) | |||
MS Query - Alias syntax | Excel Worksheet Functions | |||
DB query syntax | Excel Programming |