Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SQL query
Hi I try to use this qurey szSQL = "SELECT * FROM [Blad1$] WHERE A = 1" and it works fine if I don't use "WHERE A = 1" Another question is how to do if I want to do somthing like this SELECT A FROM [Blad1$] Is it possible? Sorry for my bad english Ragards Rolf *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
SQL query
Hi,
The query will work so long as the syntax is correct. You will need to put a on error clause in to trap the error you will get if it returns zero records. I use this On Error GoTo ErrorChecker: ErrorChecker: ' EOF Error If Err = 3021 Then rsADO.Close ** Do Something ** End If Else MsgBox (Err & "Error") Stop End If "Rolf G" wrote: Hi I try to use this qurey szSQL = "SELECT * FROM [Blad1$] WHERE A = 1" and it works fine if I don't use "WHERE A = 1" Another question is how to do if I want to do somthing like this SELECT A FROM [Blad1$] Is it possible? Sorry for my bad english Ragards Rolf *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Use MS Query to query data within the current work book | Excel Discussion (Misc queries) | |||
Convert hard coded query criteria to Parameter Query | Excel Discussion (Misc queries) | |||
Excel 2007 / MS Query - editing existing query to another sheet | Excel Discussion (Misc queries) | |||
Web query: Want to pause macro while Web query completes refreshin | Excel Programming | |||
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? | Excel Discussion (Misc queries) |