Is there a way to make it so Access does not create an import errors table if there are problems? I am handling import errors via another method, but these tables being auto generated are causing headaches, especially after several months they begin to stack up.
Thanks in advance
6 7086
Is there a way to make it so Access does not create an import errors table if there are problems? I am handling import errors via another method, but these tables being auto generated are causing headaches, especially after several months they begin to stack up.
Thanks in advance
Hi Nathan,
You might want to consider looping through the table defs on opening of the database or some other 'relevant' point to determine if any exist and if so delete them. You can base the the logic for that on the table name having 'ImportErrors' contained in the name of the table to take into account the incremental naming nature of access for successive import errors. -
-
Function DeleteImportErrors()
-
Dim DB As DAO.Database
-
Dim T As DAO.TableDef
-
Dim TName As String
-
Dim I As Integer
-
Set DB = CurrentDb()
-
For I = 0 To DB.TableDefs.Count - 1
-
Set T = DB.TableDefs(I)
-
TName = T.Name
-
If InStr(TName, "ImportErrors") > 0 Then
-
DoCmd.DeleteObject acTable, TName
-
End If
-
Next I
-
End Function
-
Regards
Jim :)
Awesome! Thanks Jim...worked like a dream. I put it on the splash screen as on on open event so it will start fresh each session.
Thanks again!
Awesome! Thanks Jim...worked like a dream. I put it on the splash screen as on on open event so it will start fresh each session.
Thanks again!
You're welcome
Jim :)
Is there a way to make it so Access does not create an import errors table if there are problems? I am handling import errors via another method, but these tables being auto generated are causing headaches, especially after several months they begin to stack up.
Thanks in advance
-
Dim tdf As DAO.TableDef
-
-
For Each tdf In CurrentDb.TableDefs
-
If InStr(tdf.Name, "ImportErrors") > 0 Then
-
CurrentDb.TableDefs.Delete tdf.Name
-
End If
-
Next
Hi Nathan,
You might want to consider looping through the table defs on opening of the database or some other 'relevant' point to determine if any exist and if so delete them. You can base the the logic for that on the table name having 'ImportErrors' contained in the name of the table to take into account the incremental naming nature of access for successive import errors. -
-
Function DeleteImportErrors()
-
Dim DB As DAO.Database
-
Dim T As DAO.TableDef
-
Dim TName As String
-
Dim I As Integer
-
Set DB = CurrentDb()
-
For I = 0 To DB.TableDefs.Count - 1
-
Set T = DB.TableDefs(I)
-
TName = T.Name
-
If InStr(TName, "ImportErrors") > 0 Then
-
DoCmd.DeleteObject acTable, TName
-
End If
-
Next I
-
End Function
-
Regards
Jim :)
Hello Jim, not trying to step on your toes, but just offering an alternative approach.
Hello Jim, not trying to step on your toes, but just offering an alternative approach.
Feel free Dez.....
For i believe that For each loop
.....there is a way lol :))
Neeeeext!!
Jim :)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Carsten Gehling |
last post by:
Figured out myself - I just removed the line with "from url import Url" -it
doesn't seem to be used anywhere ;-)
- Carsten
> -----Oprindelig meddelelse-----
> Fra:...
|
by: x-herbert |
last post by:
Hi,
I have a small test to "compile" al litle script as a WMI-Tester. The
script include a wmi-wrapper and "insert" the Win32-modeles.
here the code:
my "WMI-Tester.py"
-----
import wmi
|
by: Wicked |
last post by:
Hi all,
Has anyone got rpm.py? Is this a class/module for Python?
I am getting the following error:
File "./extra/scripts/update_release.py", line 42, in ?
import rpm
ImportError: No...
|
by: M. Lavasani |
last post by:
Hi
I am trying to test Python-2.3.
Any solution for this problem please:
>>>gmake test
case $MAKEFLAGS in \
*-s*)...
|
by: bbrazeau |
last post by:
I have a database mdb. that I've made a mde. file out of. When I try
to run the file I get a can't make changes requested, would create
duplicate values error.
Now for the facts: The open event on...
|
by: Joe |
last post by:
I am using Access 2003 and are linking to an Oracle 9i ODBC datasource
(using Oracle ODBC drivers). After linking the tables in Access, I inspect
the data contained in the linked tables. For...
|
by: Ian Boyd |
last post by:
Every time during development we had to make table changes, we use Control
Center. Most of the time, Control Center fails. If you try to "undo all", it
doesn't, and you end up losing your identity...
|
by: nyathancha |
last post by:
Hi,
I have a question regarding best practices in database design. In a
relational database, is it wise/necessary to sometimes create tables
that are not related to other tables through a...
|
by: Mourad |
last post by:
Hi All,
Is it possible to create a Make Table query in access (2.0 and 2003)
that creates the table into a SQL Server database?
Following the steps:
1- Create New Query
2- Set Query Type as...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |