Is it possible to force a query to start table search at end?

If an import hits errors it creates an ImportErrors table - can't remember the exact name format, I think it contains the name of the table being imported to. If you were to delete-if-present that table prior to the import then check again for its presence afterwards you'd know whether the import was successful. Trouble is that it might contain "errors" that you're not particularly bothered about, only you can know that by looking at it.
 
Nigel, that was a question I had in another post; i.e., how to tell if an import was successful. I decided to use a starting and ending record count, matching that to the number of transactions (lines of text in the txt file) being imported. I also check to see if any table_importerrors tables were created.

But I'm still hoping to get answer to my last question regarding SQL parameter limits and query length.

Thanks.
 
Access 2010 specifications

Number of characters in an SQL statement Approximately 64,000*

Number of characters in an SQL statement that serves as the Recordsource or Rowsource property of a form, report, or control (both .accdb and .adp) 32,750
 
Last edited:
Thanks for all your help. I'll get back to this if things don't work out.
 
Getting a Run Time 2950 'Reserved Error' when running the DCount from Excel with the code below. The code, however, works when retrieving data to Excel:
strDB_Path = "S:\....Database.accdb"
Set objConn = New ADODB.Connection
objConn.Provider = "Microsoft.ACE.OLEDB.12.0"
objConn.Open strDB_Path
If objConn.State = adStateOpen Then
lngCount = Nz(DCount("*", "tableName", "[Source File] = '" & sFile & "'"), 0)

If I open the database manually, no error.

Thanks.
 
In Access, DCount() is provided by the Application object. Looks like there's a DCount() in Excel too, but it takes different parameters. But if you open a connection like that you can just open a recordset too, maybe with SQL like . . .
Code:
SELECT Count(*) As MyCount
FROM MyTable
WHERE MyExpression
 

Users who are viewing this thread

Back
Top Bottom