Solved

Field Mapping Form - Suggestions.

Posted on 2010-08-26
7
356 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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 

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

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

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…
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…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

747 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

13 Experts available now in Live!

Get 1:1 Help Now