Solved

Import text data into existing linked field?

Posted on 2007-11-29
4
614 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

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

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

911 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

22 Experts available now in Live!

Get 1:1 Help Now