VB MS Access Syntax error in FROM clause Error

From: VB MS Access Syntax error in FROM clause (carl244541_at_yahoo.com)
Date: 05/26/04


Date: Wed, 26 May 2004 08:01:05 -0700

I have a program that is recieving the following error "Syntax error in FROM clause." and I am not sure why anyone have any ideas, here is the code:

            strSQL = "SELECT * FROM Project Where ProjectID=" & Val(PrjID.Text)
            Set rNew = New ADODB.Recordset
            rNew.CursorLocation = adUseClient
            Call OpenAccessConnection(cnn, gDBNameandPath)
            rNew.Open strSQL, cnn, adOpenKeyset, adLockBatchOptimistic, adCmdTable

it occurs on the open, any help would be appreciated.

carl



Relevant Pages

  • VB and MSAccess Syntax error in FROM clause problem
    ... I am recieving an error "Syntax error in FROM clause." ... openaccessconnection creates a new connection and opens the database and is used though out my code with no problem. ...
    (microsoft.public.vb.database.ado)
  • SQL problem in script
    ... similar to VBS I thought that I should try my luck here. ... I don't see any syntax error in the FROM clause or am I missing ... Sub AddCompany() ...
    (microsoft.public.scripting.vbscript)
  • Re: CONTAINS clause problem with apostrophe
    ... Meant to post to SqlServer group. ... I am confused by the MSDN help regarding the Contains clause for fulltext search. ... with the CONTAINS clause using escape for single-quote also returns any list_name that contains 'girl' as well. ... When I don't double up the quotes, the CONTAINS clause returns an error " syntax error near 's' ", not what is expected by the online Help. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Whats wrong with this SQL join statement????
    ... >work without success. ... >the "Order By" clause??? ... The error is "Syntax error in JOIN ... Hexman ...
    (microsoft.public.excel.programming)
  • Whats wrong with this SQL join statement????
    ... I've tried many ways to get a simple Select-with-Join statement to ... work without success. ... the "Order By" clause??? ... The error is "Syntax error in JOIN ...
    (microsoft.public.excel.programming)