Switchboard / macro import / Error if import fails?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am running Access 2003. I'm creating a database that will get emptied and
re-used several times a day. (Validating info from a data dump.) Ken Snell
gave me good info on how to create a macro that the user run from a
switchboard to import the data. (User will create the import file before
launching the Access database.) This is working fine ... as long as I use
the SPECIFIED filename for the import file. I am trying to figure out how to
have the macro display an error message if the import fails because the user
made a typo on the import file name.

I get an error message when I run the macro from the macros pane. (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.) However, when I run the macro from the switchboard, there is no
message. I just get the message I coded for "import complete."

I tried adding a step at the beginning of the macro to set warnings on.
This didn't have any effect. I looked in the help and searched here but I
must be looking wrong. Can anyone point me in the right direction?

Thanks for your help.
 
I think you need to ask this in an Access newsgroup
- this is a FrontPage newsgroup

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Hi,
|
| I am running Access 2003. I'm creating a database that will get emptied and
| re-used several times a day. (Validating info from a data dump.) Ken Snell
| gave me good info on how to create a macro that the user run from a
| switchboard to import the data. (User will create the import file before
| launching the Access database.) This is working fine ... as long as I use
| the SPECIFIED filename for the import file. I am trying to figure out how to
| have the macro display an error message if the import fails because the user
| made a typo on the import file name.
|
| I get an error message when I run the macro from the macros pane. (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.) However, when I run the macro from the switchboard, there is no
| message. I just get the message I coded for "import complete."
|
| I tried adding a step at the beginning of the macro to set warnings on.
| This didn't have any effect. I looked in the help and searched here but I
| must be looking wrong. Can anyone point me in the right direction?
|
| Thanks for your help.
 
Back
Top