Solved

Import text data into existing linked field?

Posted on 2007-11-29
4
627 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
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

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

696 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