Advertisement

07.01.2008 at 07:16PM PDT, ID: 23532312
[x]
Attachment Details

Parse CSV File Into Microsoft Access mdb Using VBA

Asked by darrylf290567 in Microsoft Access Database, Access Forms, Visual Basic v1.0.5.x

Tags: VBA

Hi All,

I want to be able to read a csv file using VBA inside the Access mdb that is attached and insert new data into the Company table from the csv file. The VBA should also be smart enough to check if the data already exists in the Company table by matching Company column inside the csv file with the CompanyName column in the Company table in the mdb file. If there is no match than insert the data into the Company table: The following data mapping of columns from the csv file to the Company table are as follows and shoud be used:
CSV File:                              MDB File:
Company            =                CompanyName
Address_Line_1 =                Street1
Address_Line_2 =                Street2
City            =                         Suburb
Zip_Code            =                PC
Phone            =                Telephone1
Phone_-_Mobile           =     Telephone2
Email            =                email
Web_Page      =            www

The above fields are the ONLY fields that need to be inserted into the Company table from the csv file if the company does not exist in the Company table.

The 2nd part is reading the CSV file and inserting new data into the Contact table from the csv file. There needs to be a check by the csv file fields: First_Name and Last_Name columns with the Contact table columns: FirstName and Surname so that the same data in the csv file does not get inserted when there is a match.

The mapping of the data that needs to be entered is:
CSV File:                              MDB File Contact table:
First_Name            =                FirstName
Last_Name =                       Surname
Title =                                      Title
Phone            =                TelephoneExt
Phone_-_Mobile           =     mobile

See attached mdb file and csv file.

PLEASE HELP ME,

Kindest Regards
darrylf290567Start Free Trial
Attachments:
 
access mdb that holds the data
 
 
comma separated file that is used
 
[+][-]07.01.2008 at 08:52PM PDT, ID: 21913316

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.01.2008 at 08:54PM PDT, ID: 21913327

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.01.2008 at 09:08PM PDT, ID: 21913384

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.01.2008 at 09:31PM PDT, ID: 21913481

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.01.2008 at 09:32PM PDT, ID: 21913490

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.01.2008 at 10:00PM PDT, ID: 21913598

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.01.2008 at 10:11PM PDT, ID: 21913628

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.01.2008 at 10:13PM PDT, ID: 21913638

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.01.2008 at 10:14PM PDT, ID: 21913639

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.01.2008 at 10:17PM PDT, ID: 21913644

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.01.2008 at 10:21PM PDT, ID: 21913656

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.01.2008 at 10:27PM PDT, ID: 21913671

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.01.2008 at 10:41PM PDT, ID: 21913718

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.01.2008 at 10:57PM PDT, ID: 21913779

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Access Database, Access Forms, Visual Basic v1.0.5.x
Tags: VBA
Sign Up Now!
Solution Provided By: UniqueData
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.01.2008 at 10:58PM PDT, ID: 21913789

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.02.2008 at 12:07AM PDT, ID: 21914089

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 10:48PM PDT, ID: 21960864

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628