Solved

Import text data into existing linked field?

Posted on 2007-11-29
4
611 Views
Last Modified: 2013-11-29
Hi -

I'm trying to import data (using the wizard) from a text file into a table that has a number of linked fields to other tables.

So, in particular, I'm trying to get one field from the text file that's a list of names.  The destination field is a link to another table, so it's data type is actually "number" (although the field it links to is a text field).  When I try to import, I get an "Invalid Argument" error.

Maybe I have to import each field from the text file separately not into the linked fields, but into the other tables that are linked to?  Actually, now that I think about it, this wouldn't work, as the relationships of the links are "many to one".

Can this be done, or am I SOL?  Need more info?

Thanks,
Noah
0
Comment
Question by:noahisaac
  • 2
4 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 20374397
Need more info? Yes
Post the table structures
0
 
LVL 3

Expert Comment

by:incrediblejohn
ID: 20376221
Not sure what you are saying. Am I to assume that you have an MS Access database that has linked tables in it? That is no big deal, Access looks at these tables like they are local.

Can you use code? I can give you the DAO opentable code to open a text file and stick it in a recordset.

you can also just link to the text file so it looks like a table in Access. Then run your stuff from there.
0
 

Author Comment

by:noahisaac
ID: 20376879
Hi incrediblejohn -

> Not sure what you are saying. Am I to assume that you have an MS Access database
> that has linked tables in it? That is no big deal, Access looks at these tables like they are local.

Not exactly.  The "main table" I'm trying to import the data into is comprised of fields that are lookups to fields in other tables in the same database.


> Can you use code?

I'm pretty bad with SQL, but I do know a little.


> I can give you the DAO opentable code to open a text file and stick it
> in a recordset.

That would be most helpful.  Do you need my table structure?


> you can also just link to the text file so it looks like a table in Access. Then run your stuff from there.

Ah, this sounds like a good option.  I just looked this up: Is this a feature of 2007, or can you do it with 2003, too?


Thanks,
Noah
0
 

Accepted Solution

by:
noahisaac earned 0 total points
ID: 20826415
For anyone that may be interested:

Trying to import text was too annoying.  I got ODBC access to the original source of the data.  Now I don't have to do the import at all.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

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…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
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…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

762 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

20 Experts available now in Live!

Get 1:1 Help Now