Run-time error -2147217900 
Author Message
 Run-time error -2147217900

I'm getting the following VB error:

Run-time error '-214721900 (80040e14)':
[Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.

The problem occurs after I open a report, close it, then load a form
that accesses the database.  When I inspect the SQL statement, there is
no error in it.  The problem does not occur if I don't open and close
the reports.  The reports seem to leave the database connection open, so
I have the following code to check if the database is still open:

    tempval = "'" & txtMonumentName.Text & "'"
    queryString = "select * from Monuments where monumentName = " &
tempval
    With DataEnvironment1.rscmdMonuments
        If .State = adStateClosed Then
          .Open queryString
        Else
          .Close
          .Open queryString
        End If
        If .RecordCount > 0 Then frmPole.Show 1
    End With

The problem occurs in the else statement.  I close the recordset and
re-open
it with my queryString, and the run-time error occurs.  The problem does
not
occur if the database is closed, only if it is open.  The queryString is
identical
in both cases, so I don't know why the error occurs.

Any help would be greatly appreciated.

Thanks, Clay



Sun, 23 Nov 2003 06:30:52 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Run time error -2147217900

2. runtime error -2147217900

3. Runtime Error 2147217900 ODBC with Access

4. runtime error -2147217900

5. Runtime error: -2147217900 (80040E14)

6. Run-time error -2147217900 (80040e14) "Syntax error in FROM clause"

7. Run-Time Error '-2147217900 (80040e14)';

8. Error-2147217900, Syntax error in FROM clause

9. error -2147217900 instead of error -2147217873 from SQLserver

10. -2147217900 Error: Syntax error in INSERT INTO statement

11. ADO VB6 Access97 Unable to run Access Query -2147217900

12. ADO VB6 Access97 Unable to run Access Query -2147217900

 

 
Powered by phpBB® Forum Software