Microsoft Content Management Server - Importing to Access table

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > October 2007 > Importing to Access table





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Importing to Access table
Phil Trumpy

2007-10-02, 7:24 pm

I'm using Access 2003.

I am working with 2 similar Access DBs - one that contains product info and
one with packaging info. The packaging DB has a macro to import all products
from the product DB. This works fine. The info goes to a separate table and
then is appended based on an unmatc unmatched query. The user also requested
to be able to import different products that are not input into the Product
DB from an excel spreadsheet. I set this up too and it worked fine (or so I
thought). The problem is that the product DB and the corresponding table in
the packaging DB have an autonumber field for the primary key. So, when info
was imported from Excel, an autonumber was assigned that was already used in
the Product DB. Next time they tried to import from the Product DB, there
were primary keys that were already used in the Packagin DB, so all of the
records were not imported.

I can see 2 options - either make the auto number field a regular number
field and require the users to enter it OR have all the products entered in
to the Product table. Is there a way that I can 'Force' the Packaging DB to
assign a higher number in the auto number field than what it should?
Ideally, the users of both DBs would like to keep the fuinctionality the way
it is now, but I don't see that as an option.

I hope I've been clear. Thanks in advance for any advice.
Phil Trumpy

2007-10-03, 1:25 pm

Never mind. I wasn't thinking it all the way through. I just had to make
the table that receives the import into a regular number field. This doesn't
affect the autonumber in the Product DB. The users will now have to enter
their own unique ID on the import spreadsheet.

"Phil Trumpy" wrote:

> I'm using Access 2003.
>
> I am working with 2 similar Access DBs - one that contains product info and
> one with packaging info. The packaging DB has a macro to import all products
> from the product DB. This works fine. The info goes to a separate table and
> then is appended based on an unmatc unmatched query. The user also requested
> to be able to import different products that are not input into the Product
> DB from an excel spreadsheet. I set this up too and it worked fine (or so I
> thought). The problem is that the product DB and the corresponding table in
> the packaging DB have an autonumber field for the primary key. So, when info
> was imported from Excel, an autonumber was assigned that was already used in
> the Product DB. Next time they tried to import from the Product DB, there
> were primary keys that were already used in the Packagin DB, so all of the
> records were not imported.
>
> I can see 2 options - either make the auto number field a regular number
> field and require the users to enter it OR have all the products entered in
> to the Product table. Is there a way that I can 'Force' the Packaging DB to
> assign a higher number in the auto number field than what it should?
> Ideally, the users of both DBs would like to keep the fuinctionality the way
> it is now, but I don't see that as an option.
>
> I hope I've been clear. Thanks in advance for any advice.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com