Error import table

  • Thread starter Thread starter TB
  • Start date Start date
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
 
You could check the tabledefs collection for an import error table and pop
up a message box if one is found.

Steve
(e-mail address removed)
 
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
 
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
 
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
 
Back
Top