Are you sure you want all of this???
The error appears just after the code that 'Displays the record count', as the messagebox appears. Right after I click OKAY - I get the 3072. If I cancel at this point, it exits just fine.
I think it has to do with the Append query that appends the data from the temp table to the Main table. The wierd thing is that I was doing this whole procedure just fine yesterday and I have made no changes to the code or queries that have to do with this code. I've run it from my local hard drive, as well as on the network and I get it in both cases...
Thanks so much for your help Jeremy!
*************************************
Private Sub cmdImport_Click()
Dim strFile, SQLStmt As String
Dim intRecordNum, intTotRec As Integer
Dim StartDate, EndDate As Date
Dim intResponse, intSumDR, intSumCR As String
On Error GoTo Import_Err
DoCmd.SetWarnings False
'Begin Import
intResponse = MsgBox("Are you ready to begin the Import process?" & vbCrLf & vbCrLf & _
"Find the current Discoverer .txt export to import into the ART database.", vbOKCancel, "BEGIN IMPORT"

If intResponse = vbCancel Then
Exit Sub
End If
'Prompt the user to find the file to import
strFile = MSA_SimpleGetOpenFileName
If strFile = "" Then ' if user clicks Cancel button
MsgBox "File was not imported because you cancelled the last procedure.", vbOKOnly, "Import Cancelled"
Exit Sub
End If
'Create new record and insert File Name and Date/Time Stamp to 000 Import History table
intRecordNum = DMax("[ImpFile_Ref]", "[000 Import History]"

+ 1 'define the new value in ImpFile_REF
SQLStmt = "Insert into [000 Import History] ([ImpFile_Ref], [File Name], [Import Date/Time], [Posted Start Date], " & _
"[Posted End Date]) Values ( " & intRecordNum & ", '" & strFile & "', Now(), NULL, NULL)"
DoCmd.RunSQL SQLStmt
'Import the data into the '0001 Import Discoverer Extracts' table
DoCmd.TransferText acImportDelim, "AST Import Specs", "0001 Import Discoverer Extracts", strFile
'Update StartDate & EndDate in 000 Import History table
StartDate = DMin("[Posted Date]", "[0001 Import Discoverer Extracts]"

EndDate = DMax("[Posted Date]", "[0001 Import Discoverer Extracts]"
DoCmd.RunSQL "UPDATE [000 Import History] SET [Posted Start Date] = '" & StartDate & "' WHERE [ImpFile_REF] = " & intRecordNum & ""
DoCmd.RunSQL "UPDATE [000 Import History] SET [Posted End Date] = '" & EndDate & "' WHERE [ImpFile_REF] = " & intRecordNum & ""
'Calculate the Total Records and Sum of the DR & CR
intTotRec = DCount("[Account]", "0001 Import Discoverer Extracts"

intSumDR = Format(DSum("[0001 Import Discoverer Extracts]![Accounted DR]", "[0001 Import Discoverer Extracts]"

, "##,##0.00"

intSumCR = Format(DSum("[0001 Import Discoverer Extracts]![Accounted CR]", "[0001 Import Discoverer Extracts]"

, "##,##0.00"
'Display the Total Record Count, Debits & Credits. User must confirm and Click OK to continue.
' If user clicks Cancel, the records imported into '0001' are deleted, as well as the record
' just created in '000' that reports the imported filename and date/time stamp
intResponse = MsgBox("Total Record Count = " & intTotRec & vbCrLf & _
"Total Debits = " & intSumDR & vbCrLf & _
"Total Credits = " & intSumCR & vbCrLf & vbCrLf & _
"Do you wish to continue the import?" & vbCrLf & _
"If cancelled, no records will be imported.", vbOKCancel, "Import Totals"
If intResponse = vbCancel Then
DoCmd.RunSQL "DELETE * From [000 Import History] WHERE [ImpFile_REF] = " & intRecordNum & ""
DoCmd.RunSQL "DELETE * From [0001 Import Discoverer Extracts]"
Exit Sub
End If
'Append the 0001 records to 1001
' Duplicates are excluded due to query controls.
' Since SetWarnings is off, user will not know that the duplicates have been cleansed.
DoCmd.OpenQuery "0001 Append Discoverer Extracts", acViewNormal, acEdit
'Delete the 0001 records
DoCmd.RunSQL "DELETE * From [0001 Import Discoverer Extracts]"
'DoCmd.SetWarnings True
'refresh the form to see the new 000 Import History
Forms![10000 Import and Match]![10001 Import History sfrm].Requery
MsgBox "The Import is Complete! You must now 'Match' the imported entries.", vbOKOnly, "Import Complete!"
Exit Sub
Import_Err:
Select Case Err.Number
Case 3033 'no permissions: wrong workgroup file
'this error is triggered when the backup routine attempts to run, so no restore operation is necessary
MsgBox "You do not have permission to perform this operation." & vbCrLf & "Ask your database support person to set you up on the 'GWLA5500' workgroup file and try again."
Exit Sub
Case 3072 'not enough memory to complete procedure
MsgBox "There is not enough computer memory available to complete the import." & vbCrLf & _
"Close any other open applications and try again.", vbExclamation, "Import Failed"
Resume Restore_Routine
Case Else
MsgBox Err.Number & ": " & Err.Description & vbCrLf & _
"There is a problem with the data imported." & vbCrLf & _
"Filename: " & strFile & vbCrLf & "Previous database tables will be restored."
Resume Restore_Routine
End Select
Exit Sub
Restore_Routine:
'Not using copyobject as when run queries, data is appended/deleted in both backup and main table.
' DoCmd.CopyObject , "1001 Consolidated Pooled Ins", acTable, "previous_1001 Consolidated Pooled Ins"
DoCmd.RunSQL "DELETE * From [1001 Consolidated Pooled Ins] WHERE [ImpFile_REF] = " & intRecordNum & ""
DoCmd.RunSQL "DELETE * From [000 Import History] WHERE [ImpFile_REF] = " & intRecordNum & ""
DoCmd.RunSQL "DELETE * From [0001 Import Discoverer Extracts]"
Exit Sub
End Sub