• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 293
  • Last Modified:

Need to display msg if table exists in Access2003 dB

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
Muskie12
Asked:
Muskie12
  • 2
1 Solution
 
Dale FyeCommented:
If DCOUNT("*", "mSysObjects", "[Name] Like '*_ImportErrors'") > 0 then
   msgbox "There were import errors"
endif
0
 
Muskie12Author Commented:
Thanks for quick solution!
0
 
Dale FyeCommented:
Glad to help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now