Solved

Need to display msg if table exists in Access2003 dB

Posted on 2012-04-09
3
277 Views
Last Modified: 2012-04-09
I have an access 2003 dB with code that imports data into several tables and executes Queries and stuff. SetWarnings is false and I need to keep it that way.

Once in a while, there will be a problem whereby some records fail to be imported into a particular table and I need to know when this has happened - but not until after all the VBA code has run since there will be occasions when these missing records are acceptable.

I'm looking for some VBA code I can place at the end of the Sub that will check for the  presence of any table in the dB that has a suffix of "_ImportErrors" and send me a msg if one or more tables have this suffix.
0
Comment
Question by:Muskie12
  • 2
3 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
Comment Utility
If DCOUNT("*", "mSysObjects", "[Name] Like '*_ImportErrors'") > 0 then
   msgbox "There were import errors"
endif
0
 

Author Closing Comment

by:Muskie12
Comment Utility
Thanks for quick solution!
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
Comment Utility
Glad to help.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now