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
 
S

Steve

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)
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top