Lyle Fairfield <ly***********@aim.com> wrote:
: "Mike Charney" <no*****@everything.net> wrote in
: news:aO******************@newssvr27.news.prodigy.n et:
:> I have an Access data project. In this project I have a form that when
:> Access starts is loaded and this form has VBA code attached to it.
:>
:> One of the first things I need to do is check if a table called
:> tblimport exists. If this table exists then I need to delete it. I
:> have tried looking through the web but I can not find a simple
:> solution to this. I do not want a separate module, just a couple lines
:> of code.
:>
:> Does the table exist, Yes = Delete it, No=Continue code execution.
:>
:> Does any one know how to do this?
:>
:> Thanks,
:> Mike
:> m charney at dunlap hospital dot org
: I have a one line solution but I guess that's too few.
: Besides, 99 times out of 100, it's bad form and/or reflects poor design to
: be constantly deleting and creating a table, and I wouldn't want to
: propogate bad form or poor design.
: What's that, you just asked or a solution and not a lecture? Tant pis!
: --
: Lyle Fairfield
Now that you've heard the advice of a master user of Access,
here's something found by a 'fair' user of google:
http://www.fontstuff.com/access/acctut16.htm
gives the one-line of code for deleting a table. I'm sure Lyle
can actually do the whole thing in one line, but *I* would need
to add error-trapping code to handle the error if the table
doesn't exist.
--thelma