Custom warning message

D

Dennis

Using a macro, I have a series of action queries, 1. A
table delete query, 2. A file import query and then 3. A
delete query, that deletes certain records that do not
match records on the original import query.

As I was tired of pressing ok on each warning window that
warns of deletes, appends, and data changes, I disabled
the action queries warning. The problem arises when
someone (including me) activates the macro when the import
disk is not in the A: drive. As you may have concluded all
of the records in the database are deleted.

What I would like to do is either make some way to make
sure the file access is looking for is in the drive before
the actions continue or have one warning window that asks
the user to make sure the file is in the A:drive. I prefer
the first idea that helps make it user/idiot proof. Maybe
there is another idea that is much better?

Thanks,

Dennis
 
A

Allen Browne

Dir$() will let you know if the file exists in the expected location.

The ultimate answer might involve wrapping all 3 operations in a
transaction, so you can roll the whole thing back for an all-or-nothing
result. This involves writing some code.

Details and example at:
http://allenbrowne.com/ser-37.html
 

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

Similar Threads


Top