Field Mapping Form - Suggestions.

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

VenturSumAsked:
Who is Participating?
 
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:
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
 
als315Commented:
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
 
VenturSumAuthor Commented:
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
als315Commented:
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
 
VenturSumAuthor Commented:
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
 
als315Commented:
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
 
Jeffrey CoachmanMIS LiasonCommented:
;-)

Jeff
0
All Courses

From novice to tech pro — start learning today.