Stuart McLachlan
stuart at lexacorp.com.pg
Fri Sep 19 01:43:09 CDT 2003
On 18 Sep 2003 at 23:19, Sad Der wrote:
> Hi group,
>
> for the last 1,5 hour I'm trying to create an ADO
> recordset....
>
> What the hell is wrong with the code below?
> I use a function called GetStatus to run a query and
> send me the results back...shouldn't be that complex?!
>
> When I call it like this:
> gstrSwitchStatus = GetStatus("qrySwitchStatus")
>
> I keep getting the error:
> Invalid SQL-statement; expected DELETE, INSERT,
> PROCEDURE, SELECT, or UPDATE.
>
> Or when I call it like:
> (this is the sql-code of the query!)
> strSQL = "SELECT [tblSource].[Status] AS qryStatus
> " & _
> "FROM tblSource " & _
> "WHERE
> [tblSource].[ID]=[Forms]![fInterface]![lblID].Caption;"
>
Hard to tell in the message, but it looks as though there is no space
after qryStatus so you end with
"qryStatusFROM"
instead of
"qryStatus FROM"
--
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System
Support.