Error import table

T

TB

I have a process that imports a txt file to a table. Most of the time this
works fine. From time to time the txt file will give a problem and this
creates an import error table. Is there a way to make a message box pop up to
let the user know when the error table has been created?
The person using this database is not very computer savvy and I would like a
way to let them know when the txt file did not import correctly.
Thanks
TB
 
M

Maurice

TB,

I suspect you get the standard name for the error import tables right? Maybe
after the import you can test for the existance of the errortable by using a
small loop like this: (place this right after your import routine).

Dim aob As AccessObject
For Each aob In CurrentData.AllTables
If aob.Name = "error import table" Then
MsgBox "something went wrong"
End If
Next

ofcourse you could also check the first characters of the tablename but
that's up to you..

hth
 
T

TB

Thanks Maurice that worked great!!
TB

Maurice said:
TB,

I suspect you get the standard name for the error import tables right? Maybe
after the import you can test for the existance of the errortable by using a
small loop like this: (place this right after your import routine).

Dim aob As AccessObject
For Each aob In CurrentData.AllTables
If aob.Name = "error import table" Then
MsgBox "something went wrong"
End If
Next

ofcourse you could also check the first characters of the tablename but
that's up to you..

hth
 
R

Risse

TB said:
I have a process that imports a txt file to a table. Most of the time this
works fine. From time to time the txt file will give a problem and this
creates an import error table. Is there a way to make a message box pop up
to
let the user know when the error table has been created?
The person using this database is not very computer savvy and I would like
a
way to let them know when the txt file did not import correctly.
Thanks
TB
 
Top