Import and overwrite?
If not, one way I'm thinking I could possibly get around it is to change my primary key to an Autonumber field (currently I don't use any autonumbers in the table) and then run a find duplicates query on the field I am currently using as my primary key. Firstly, would this work? Secondly, having done this, how could I get the least recently acquired part of the duplicate to be ignored in the final report
Thank you for taking the time to report an issue.
What's wrong... Please write below.
What I do is download a report from the Army database into an excel format and then I upload it into the access database. This brings in along with their name, unit, training info and information that may change weekly. Now the problem I am running into is having the data from the excel import replace other records. I have a primary key in the table it goes to because that table is linked to another table where another record for the soldier is located (this has information that is not in the army databases that we want saved when we do an import).
Now if the record is not in the access database it will add that one, but will not overwrite the records already there. It really doesn't help so much because then we would have to manually do these changes (like last fitness test results and date, etc) which when you have 400+ soldiers that can be very tedious....
Does anyone know how I can import my data and keep the leading zeros
How do I get this command to overwrite the current table with new data each month?
An error occurred trying to import file [blah]. The file was not imported.
I imported this exact file yesterday without a problem. I was importing it again to overwrite the first one because I wanted to change some of the Long Integer fields to Text.
so I tried to just import the file again from scratch, not changing anything (leaving the Long Integer fields as theyare), but I still get this error.
I would like to be able to click a button and import all the tables from the old version to the new one, and OVERWRITE the data.
I may add new tables in between versions, so deleting all tables before import is not an option.
my current code, does almost what I need, but it adds a number on the end, and with 50 or so tables, it's just as time consuming as the manual method.
my current code:
Dim db As Database Dim tdf As TableDef
Set db = OpenDatabase("C:\Users\userdir\Desktop\stuff\BACKUPS\main backup.mdb")
For Each tdf In db.TableDefs
DoCmd.TransferDatabase acImport, "Microsoft Access", "C:\Users\userdir\Desktop\stuff\BACKUPS\main backup.mdb", acTable, tdf.Name, tdf.Name
Set db = Nothing
I am assuming I'll probably need to index the table names in a variable somewhere and delete tables mentioned in said variable
Transfer Type: Import Delimited
Specification Name: STAT01 Import Specification
Table Name: 01 Data
File Name: E:\HNA Shared Other\New IT folder\I90 STATS\
Has Field Names: No
HTML Table Name:
My question is:
When you import data to the specified table does it always append
the new records to the table OR does it overwrite all the transactions in the table?
I've used the "output" macro to output some tables from the database into a windows file directory. Until then it works.
But I want to disable the prompt which asks me if I want to overwrite the excisting file and I want to disable this prompt and that the answer is always yes.
what should I do? how can I get.
In the previous version of Access I could import the data and it would keep any leading zeros during the import. Now it is dropping the leading zeros when I importthe data even though I have specifically formatted the data as text.
Does anyone know how I can import my data and keep the leading zeros?
I use an online software to process customer transactions. I export the transaction data to an Excel file, import the file to Access, and then use Access to create reports and receipts.
Here's what I would like to do:
Instead of importing the file to Access, I would like to create a link to the Excel file. Creating the link is no problem. The problem comes in when I want to overwrite the Excel file with a new file. Even though I name the file the same name, etc, Access make me create a new link to this new file.
Is there a way to overwrite the linked Excel file without creating a new link from Access