Call Dialog box for Import (and errors)

A

Andy

I've managed to use this script to call the import dialog box to navigate to
the file to import with the associated import spec.

However, occassionally there will be import errors that will need ammending
at source and the import process to be re-run. How after running this process
can I get Access to look for/notify any entries in the import error table
that is created?
 
D

Dale Fye

Andy,

What type of file are you importing? I prefer to import data into temporary
tables, which allows me to write code and create forms to correct that data
before taking it to the next step (actually inserting it into my production
data).

I frequently set these temporary tables up with all text fields (allow
NULLs, not required) to prevent errors from occuring when someone enters text
into a field that should be numeric. Then, I check for NULL or empty cells
where data is required, or text where numeric data is required. This can be
time-consuming to setup, but makes the process go a lot smoother when you
actually import the data into your production tables.

Back to your original question. there is a system table (mSysObjects) that
contains a list of all the objects in your database. The [Type] field in
this table indicates whether the object is a table, form, ..., and the value
for a table that is physically located in the mdb is 1. Take a look at that
table (using DLOOKUP) to determine whether the error table has been created
or not.

HTH
Dale
 

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