Solved

Loading excel data to access

Posted on 2013-12-13
3
462 Views
Last Modified: 2013-12-13
Hi,

Im loading excel data which has come from various data sources into an access database. The data types are not consistent, which means i keep getting paste errors on trying to paste into one master access table.

Is there any way i can avoid this error or am i doing something wrong?

Many thanks
0
Comment
Question by:Seamus2626
  • 2
3 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 39716367
A very common approach is to import your raw data into a 'staging' table first, without attempting to format the initial import in any way.

You can use the TransferSpreadsheet command for this in VBA.

Once you do that, you can use VBA to read the initial import from the staging table and cleanup/format the data as needed to fit it's destination table, using INSERT and/or UPDATE queries or recordset code to add it to the needed tables.
0
 

Author Closing Comment

by:Seamus2626
ID: 39716370
Yep, they are some good options, ive just went with linked tables now!
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39716395
Funny - I was just about to type up that you can also link the spreadsheet and use it in the same way as a staging table.

FWIW, I prefer the import option -- largely personal preference, but I find that to be a more flexible approach.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

707 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