Advertisement

05.20.2008 at 06:09PM PDT, ID: 23419382
[x]
Attachment Details

How can I test if a table exists?

Asked by StuBabyAight in Access Coding/Macros

Tags: , ,

Hi, I'm importing text data from a supplier.  The first 4 records contain text information that I don't need, but the supplier is unable to remove them.  This puts text data into the first four records, but the first field is numeric.  I'm ok with this, but each time I import a file, a table is created "invoice_importerror" and then invoice_importerror1", etc.  I have put in the code :

currentDb.tableDefs.Delete "invoice_importerrors"

which works fine.  
My question is how can I test this table exists before executing the above line?  I want to avoid a future problem where the supplier removes the offending lines, and I feel it's a lot tidier to check for something before it's deletedStart Free Trial
[+][-]05.20.2008 at 06:15PM PDT, ID: 21611515

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 06:20PM PDT, ID: 21611531

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 06:21PM PDT, ID: 21611541

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Access Coding/Macros
Tags: Microsoft, access, 2003
Sign Up Now!
Solution Provided By: CMYScott
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628