Populate primary key into imported tables

E

edigo

I've recently designed a fillable PDF file that users can type in and send it
back as a xml file.

I want to import the xml into Access database so we can keep track of records.
Unfortunately, it comes out a number of tables. And only 1 table has a
primary key, other tables do not. Is it any way I can populate the primary
key into those tables? So that I can combine all tables as one record. I
could do it manually but it would be tedious. I would like to find a smarter
way.

Please help

Edigo
 
P

PieterLinden via AccessMonster.com

edigo said:
I've recently designed a fillable PDF file that users can type in and send it
back as a xml file.

I want to import the xml into Access database so we can keep track of records.
Unfortunately, it comes out a number of tables. And only 1 table has a
primary key, other tables do not. Is it any way I can populate the primary
key into those tables? So that I can combine all tables as one record. I
could do it manually but it would be tedious. I would like to find a smarter
way.

Please help

Edigo

Edigo,
hard to tell without seeing your code... It depends on how you're doing the
import. If there is only ever one record in a child table without a primary
key, then you can do it. If you capture the primary key of the last parent
record inserted, then you can use that to update the child records. Off the
top of my head, I would look at Allen Browne's website and see what he has.
If your table records the insert date/time, then you could do a top 1 values
query to return just that record/key value and then update the child table's
foreign key with it.
HTH,
Pieter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top