Solved

Field Mapping Form - Suggestions.

Posted on 2010-08-26
7
359 Views
Last Modified: 2013-11-28
Experts,

I'm looking for a predeveloped form (buy??) or suggestions to build my own...
that will map an input file into predefined table.

My client's application requires uploading a table into an application.  The application will hold the data in a predefined table.  The source data will be either a *.CSV or an .XLS / .XLSX file type.  The input file will not be in the same structure and the predefined table, so it will need to be mapped before importing.

I've seen many mapping applications that show the input data down the left side of the form. and the target file down the right side of the form.

Any thoughts on where I can get such a form or suggestions on building one.

I'm pretty good with VBA.

Thank you!

John

0
Comment
Question by:VenturSum
  • 3
  • 2
  • 2
7 Comments
 
LVL 39

Expert Comment

by:als315
ID: 33539049
If input and output tables structure is not changing every time when you want to upload data, your can link input file to Access and make query for adding data in output table.
0
 

Author Comment

by:VenturSum
ID: 33539371
The input file is going to change.  It's like a list of customers and sometimes the first name is "FName" and sometimes it's "first name" and sometimes it "FirstName".  So I need to build a mapping module / form.  I built the vba to get the names of the rows / headers.

But I'd like to see if there is some prebuilt code so I don't have to re-invent it.

0
 
LVL 39

Expert Comment

by:als315
ID: 33539617
It is very simple change first string of excel file if columns order is same.
All ready programs with this functionality, which I ever seen use fixed internal data structure and it can't be changed
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:VenturSum
ID: 33540658
ALS, thank you for your help...


I've seen many internet applications where before I upload a file; I have to map the file I'm going to upload to the preexisting data table.  The fields of the import table are on the right, and the fields of the preexisting table are on the left.  --- this is what I need to build in Access or buy.

The clients import table will always be changing
I have no opportunity to reorganize it prior to importing it into to Access.

0
 
LVL 39

Expert Comment

by:als315
ID: 33541225
It is same to my experience - "left side" is fixed. It is difficult to find ready application with your "left side".

You can build same form - left side is your fixed fields.
You can select file, link it (you can use file extension for link type), get columns names, build list from this names and use this list for "right side". For every your field user should select from list with column names from linked file.
Then you can create SQL string with selected field relations and run it.
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 250 total points
ID: 33542022
As a start create a table (tblMapFields) with a field for the Fixed Names and a cloumn with the "Potential" Alternate names.
This way at some point you could use dlookup to find the corresponding Field Name.

Obviously you will need code to read in the Source Field Names
So I would first use standard code to import the data to a temp Access table first.
Import CSV:
DoCmd.TransferText acImportDelim, "YourImportSpecName", "TargetNewTableName", "C:\YourFolder\YourFile.csv", True

Import Excel:
DoCmd.TransferSpreadsheet acImport, , "TargetNewTableName", "C:\YourFolder\YourFile.XLS", True

You can use a DAO loop through the table field Names:
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_23910064.html

Now you create a form with tblMapFields and fill in the Source Field names

Now you can use dlookup to get the target filed name based on the source field Name
Dlookup("TargetFieldName","tblMapFields","SourceFieldName=" & "'" & Me.SourceFieldName & "'")

I am sure you are getting the idea here:
Create a Mapping Table
Set the mappings in this table
Import the file
Use Dlookup to find the Mapped field name form the imported File
...

;-)

JeffCoachman
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33553314
;-)

Jeff
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

895 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

14 Experts available now in Live!

Get 1:1 Help Now