Run-time error '7874' (1 Viewer)

BLeslie88

B Leslie
Local time
Today, 13:06
Joined
May 9, 2002
Messages
228
Doing a loop to remove error import table:

Example:
"CONTACTS1_ImportErrors"

DoCmd.DeleteObject acTable, "CONTACTS" & myNum & "_ImportErrors"

This has been working well - now today - suddenly there is no error with one table import... So I get title error message. "Run-time error '7874'"

Is there anyway to bypass this exception when it occurs without removing the line of code?

I did search forums - there was no obvious answer though similar errors.

Thanks,
Brian
:banghead:
 

MikeLeBen

Still struggling
Local time
Today, 14:06
Joined
Feb 10, 2011
Messages
187
Well yes, you could bypass it although I would look into the matter to fix your code so it's error free.

Anyway, you'd use an error handler like this to bypass it:
Code:
'....code

On Error GoTo errHandler

'...more code

Exit Sub

errHandler:
if err.number = 7874 then
resume next
Else
msgbox Err.Number & " - " & err.description
End if

End Sub
 

vbaInet

AWF VIP
Local time
Today, 13:06
Joined
Jan 22, 2010
Messages
26,374
There's really no point in deleting the table to be honest. Best delete the data instead. But it worries why you're needing to do this in the first place?

What exactly is the error message? There are hundreds of error codes out there and we don't know it all.
 

BLeslie88

B Leslie
Local time
Today, 13:06
Joined
May 9, 2002
Messages
228
It is a text file - delimited file - that there is headings among other lines that generate errors on every import as I have some forced field specifications...

This causes import errors.

I am not the one maintaining it and do not want accumilated error tables - so I do not see how not doing this wouldn't be efficient.

:confused:
 

Users who are viewing this thread

Top Bottom