×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Table existance.

Table existance.

Table existance.

(OP)
Could any one suggest me how to check whether a table exists before running a macro? This question was asked by Charlie in thread 181-6951. My question is: Is it possible to check the existence of a table without trying to open it first? What I need to do is delete a table (only if it exists), If however the table does not exist you get the typical "Action failed" error box before the code can complete it's loop.

Anyone got any ideas
Peps

RE: Table existance.

If memory serves me correctly, in the thread you mention, the bottom of that code has the error handling to trap that error so that the code can continue...

Terry M. Hoey
th3856@txmail.sbc.com
While I don't mind e-mail messages, please post all questions in these forums for the benefit of all members.

RE: Table existance.

(OP)
Your right, but what I'd like to know: Is it possible to get the error code 7874 without opening the table first?. What I don’t want to do is Open the table, close the table and then delete. Your code does work, however I have to follow this procedure.

Thanks
Peps


 

RE: Table existance.

I thought that I heard that there is a System table that lists all the objects in the database, but I don't know much about it.   You might try doing a keyword search for it here, as I know I have seen posts of it here.

Terry M. Hoey
th3856@txmail.sbc.com
While I don't mind e-mail messages, please post all questions in these forums for the benefit of all members.

RE: Table existance.

make a subroutine

on local error resume next
db.execute "DROP TABLE thing"

and call the subroutine.  You don't need to check whether it is there, as the sub will ignore the error.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close