I have a database that a client of mine has started to create. He wants to be able to import data from an excel spreadsheet into a table in Access. I created a macro that works fine but now I am having an issue with importing additional data.
His excel sheets consist of Agency ID numbers, first name, last name, SSN, etc. He also has a column in the table called order number and internal ID. Which I duplicated in the spreadsheet. He wants the internal ID to autonumber. When I first use the macro to import the spreadsheet into Access it numbers the rows accordingly (after I fill the excel sheet using the series option). However, when I try to import an additional spreadsheet (which is a test sheet)I have to fill in the Internal ID number manually and consecutively according to the last record in access.
The sample spreadsheet he sent me has 2079 records which imported fine with the macro and then I made a second spreadsheet with two rows with information in them and if I don't put in the numbers 2080 and 2081 it imports them at the top of the table without any number in the internal ID. I hope this is making sense.
Can anybody help me make it so that it automatically puts a number (consecutively)in the internal ID field when I use the macro to import another spreadsheet.
Thanks in advance
Tracy
P.S. When I go to the order details table in design view it says that field is autonumber. If I do not assign a value to the Internal ID field in the spreadsheet it comes up with an import error saying that the fields had a null value but if I number the internal ID field manually in the spreadsheet it imports just fine. I don't want to manually input numbers into the internal ID field in the spreadsheet, I want access to do that for me but it won't let me.
I have a database that a client of mine has started to create. He wants to be able to import data from an excel spreadsheet into a table in Access. I created a macro that works fine but now I am having an issue with importing additional data.
His excel sheets consist of Agency ID numbers, first name, last name, SSN, etc. He also has a column in the table called order number and internal ID. Which I duplicated in the spreadsheet. He wants the internal ID to autonumber. When I first use the macro to import the spreadsheet into Access it numbers the rows accordingly (after I fill the excel sheet using the series option). However, when I try to import an additional spreadsheet (which is a test sheet)I have to fill in the Internal ID number manually and consecutively according to the last record in access.
The sample spreadsheet he sent me has 2079 records which imported fine with the macro and then I made a second spreadsheet with two rows with information in them and if I don't put in the numbers 2080 and 2081 it imports them at the top of the table without any number in the internal ID. I hope this is making sense.
Can anybody help me make it so that it automatically puts a number (consecutively)in the internal ID field when I use the macro to import another spreadsheet.
Thanks in advance
Tracy
P.S. When I go to the order details table in design view it says that field is autonumber. If I do not assign a value to the Internal ID field in the spreadsheet it comes up with an import error saying that the fields had a null value but if I number the internal ID field manually in the spreadsheet it imports just fine. I don't want to manually input numbers into the internal ID field in the spreadsheet, I want access to do that for me but it won't let me.
Is there a way in MS Access to keep an autoincrment field counting successivly after deleting and inserting? I want the field having the right counting.
I've a button that position the table on a new record:
DoCmd.GoToRecord , , acNewRec
And I create a button to cancel that action:
Me.Undo
But the code field (autoincrement) continues autoincrementing! Explaning:
1. I click on "Add" button 2. The table's positioned on autoincrement code #1 3. I click on "Cancel" button 4. The register is cancelled, it isn't includded on table 5. I click on "Add" button 6. The table's positioned on autoincrement code #2 and the #1 isn't exists...
When I have a record that I copy and paste into a new record with one column having a unique constraint , I display message "Cannot insert duplicate code" then if not all values in the record are inserted , I get a #deleted in all columns
Refreshing , I find that the id is incremented by 2 instead of one.
That is if the previous record has ID 20 , the #deleted record has ID 22 .
How to avoid the #deleted which happens if not all columns are filled.
A common tip on this forum to reduce a db FE is to create a new db and import in from the original. Easy. Now I have done this and on navigating through the new db have no trouble when new. I then put in the start up form and close it. On start up again I get the following message. "Error accessing file. Network connection may have been lost". When trying to view any VBA coding the same message appears. All tips or directions to other treads welcome.
I imported a database designed several years ago into Access 2003, but all that I got was the tables. Is there a way to get the reports, queries, forms, etc? Thank for all the help.
I have an xml from the powers that be in IT: can post it here if anyone wants, but it's quite big. Tried to import it into Access 2003, no joy. Than I realised that it it's almost certainly attribute-centric.
http://support.microsoft.com/kb/285329
And so I need to create a template to make it look normal. although they give an example on the microsoft page, it's bespoke to the xml they create from Northwind and i'm struggling to write a template from scratch.
The xml appears to have tables embedded and all sorts, it's not just a flat file structure....
Hi, I want to automatically import an .xml file into a table that i have in my .mdb. Is this possible and if so, how do I do it? If you could point me in the right direction that would also be great.
I am trying to import into a table a very large text file that has information dumped into it every morning from a daily import.
I am building a database that is also using the same information but on a stand alone database and was curious to know if there is a way to link the txt file to a table so every morning that the new info is imported it will just automatically dump into the table.
I have filling this is not since it is a txt file and I will need to just setup a custom menu button that when pressed does the import into the table, but I was hoping it would be as simple as a link.
When importing excel spreadsheets to access, I am getting the message subscript it out of range. What do I need to do in order for the spreadsheet to be imported?
My boss and I were trying to import some data from a .txt file there is a deliberate mistake and we were trying to get a input mask/validation rule to stop that particular record
I'm having trouble with a DB that I've been using for four years in a multi-user environment. (Windows XP; Access 2000; Novell Network) Started with one user as she got a new WinXP PC (had Win2K - not totally convinced that she didn't have the problem before the new PC); she wasn't able to do a keyword search - it would bring up every record, but other users were fine. Then, it started to do it on my PC as well (WinXP - even though I had my XP for a year longer), but other users are still fine. My code still looks fine, and apparently works for others. So, thinking there may be some corruption going on, I decided to create a new DB and import in tables, queries, forms, reports, and modules. Only three of 20 forms show up as options to import and only a portion of the reports show up. All the tables and queries appear. When I go back to the "faulty" database, the forms are there and do work from my "menu form". Then, I tried compacting the "faulty" database, but I don't get the message in the lower left saying it is compacting; the hourglass comes up, then the DB opens - the size stays the same. So, I don't think it is compacting.
Any ideas ????
Thanks - and I do appreciate this forum - has saved me alot of time over the years.
I have a linked csv table into access, and have a make table query which runs off this. When i first build and run the query it runs fine, but when i run it again I get the following problem "numeric field overflow" I have checked all the data types, they match fine.....
The thing that i cannot understand is when I rebuild the query from scratch, it works fine for the first couple of times, then stops.
Hi! I've got a problem with a csv file from our MRP system. It always contains spaces BEFORE the data in the fields and I need to ignore them when I group the data. The crosstab report works absolutely fine but I don't get the right output because of those darned spaces!!:mad:
I'm using a combo box control for searching employees. Which the empID is the unique key, the form is scrolling each record, do not want it to do that. When i click on an ID, it only changes ID's but not the information thats tied to that ID. How can I fix that? any valuable information is well appreciated. Thank you
I'm fairly new at access and have been stumped at this problem.
I download a csv file from the internet and what i wanted to do is just imported straight to a table from access. Some how the csv file contain some excel function that looks like the follwoing - i.e. =T("SOME TEXT"). Access can't import the file and i'm unsure of how i can do it. Does anyone have an idea of how i can do an import? Thank you.
hi all i have an excel sheet in comma delimited form. the fields in access have input masks set, but when imported into access the masks are ignored - does anyone know a way around this. Also is there anyway to get access to tell me what records its rejected when it comes accross one that breaks a validation rule
I import data from exel 2000 into access 2000 how can I remove duplicate and unwanted data (ie Blank rows)
I recieve my daily work via an e-mailed exel spreadsheat which is then transposed before being exported to access.
I have allowed for upto 12 customers per day in my transpose macro.
The problems 1. If I get routed 5 customers I am left with 7 blank rows when I import into access. 2. If a customer is for example is not home and I am routed the same customer at a latter day, when I call up their info in my WIP form I normally get the first date the customer was routed this records the WIP at the wrong date therefore upsetting searches by date.
How can I remove the blank rows. How can I sort and remove earlier routed customers leaving the last date.
Guys I don't know if any of you have done this. I need to import a formatted excel file into an access table, I know that I need to write a vba code to do it, can someone please give me a tip or an example. The excel file is a formatted form, it's not based on columns & rows!!!! Please Please assist.
Hey guys- I have a software program that I am exporting data out of into excel (it's SQL based). From Excel, I then am importing into Access into an existing table previously created from a similar file (same columns, just different record sets). I am running into problems when importing files...
If I import into a new table, and have Access create the table based off of the Excel file- it works fine. If I try to import more records into this same table, it tells me it failed to import and that an error occured (no error's table created, no error number given). If I delete the original records in the table, and re-import the SAME RECORDS that were originally imported to create the table- it doesn't work. It will only import my files if it creates a brand new table for each import, every time.
Can Access not import into an existing table? It should- but I dont get what's going on here. I have tried DBF, HTML, txt files- all the same results. I really don't want to have to create a new table each time- as now my Queries will have to be updated everytime I create a new table. Can you please help?
I have my database pretty much ready to go, but they would like to import data from another access database into this one.
The problem I'm seeing is, I've been working so hard to normalize my database with the proper relationships etc.
The database I'm importing from, the data there are all stored in huge tables.
so for example in my database I have our main table, that holds all like data. Then my other tables for specfic data that then relate to the main table ID.
The other database has everything in 1 table.
I've created a query and got what I needed from the other database, but not sure how to import it into my main table, and have it so the 'specific' data goes into the right table, and so the Main_ID field points to the correct record in my main table.
now the old database, everything is in 1 table and I'm not sure how to break it down so after I import the table CCE/Main_ID is the same as the Main_ID in my main table.
I'm still not sure if I explained that very well....