Importing/deleting tables

G

Guest

Calling all macro experts out there!

I am automating import functions to be run from buttons on a form for users
who will be doing data entry and they do not know the inner workings of the
database. I want to be able to set a macro that imports the most recent
version of Table A from Database X into Database Y and then deletes the older
version of Table A in Database Y. However, I would like to be able to ensure
that the import process occurred successfully (that is, there is indeed a
Table A1 in Database Y) before deleting the old table and renaming Table A1
to Table A.

If for some reason an inexperienced user imported the incorrect table or
something else went awry, I would the macros to be "undone" in that the
incorrect table is removed and an error message appears to describe (again)
how to do it correctly. And the original table will not have yet been
deleted...

How may I best accomplish this in a macro (that is actually a set of macros)?

Thank you,

Jill

Thank you!

Jill
 
K

Ken Snell \(MVP\)

Because there is no error handling with ACCESS macros, you'll need to use
VBA programming to do the "error testing" that you seek.

Are you familiar with VBA code?
 
G

Guest

Uhhhh, I'm afraid not! If it's too complicated, I could just put in very
explicit instructions in a MsgBox macro to appear before running the
RunCommand - Import command...

Thanks,

Jill
 

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