Transfer data macro on switchboard - how get error msg on failure?

G

Guest

First of all, I apologize if this question is posted in duplicate somewhere.
I thought I posted about an hour ago and I keep looking on all the Access
pages but it's not popping up on any of them.

I have created a database that will be emptied and re-used many times daily.
(It's for analyzing a large validation file produced by another system.)
I've created a switchboard with commands to clear the data, import fresh data
and run the validation reports. Users create the validation file in the
other software application and save it as ImportData.txt for import to the
database.

Ken Snell gave me good info on how to create a macro that will import the
data to my data table. Works like a gem ... as long as you type the
specified file name correctly. It does not work, of course, if the filename
has a typo. When I run the macro from the macros tab, Access displays an
error. (The Microsoft Jet database engine could not find the object
'ScheduleImport.txt'. Make sure the object exists and that you spell its
name and the path name correctly.) When I run the macro from the switchboard
though, the error does not appear. I just get the "import complete" message
that I programmed into the macro.

I tried to add a line to the beginning of the macro to set warnings on.
This had no effect. I've searched help as well as the newsgroups and can't
figure out what I'm doing wrong. Can anyone please advise me on how to get
the switchboard macro to display a message if the import fails?

As always, thanks for your help.
 

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