transfer spreadsheet

  • Thread starter zaps via AccessMonster.com
  • Start date
Z

zaps via AccessMonster.com

Hi Everyone.

I have a button on my form that runs a transfer spreadsheet macro to uplink
data from excell into a access table. Question: is there a way to prevent
the data to be uplinked again?? Right now, if a user press the button again,
the data is uplinked again. Now, duplicate data is in the table. The data
consists of Names, position, department...nothing that can really be used as
a primary key.

Thanks,
Zaps
 
K

Ken Snell \(MVP\)

You'll need to disable the button in your form based on some "decision" that
the database can make that shows that the data will be duplicated if you
import it again. If you don't have a primary key that is based on or
contained within the data in the EXCEL worksheet, then how do you know when
you have duplicate data? However you are able to decide that, that is how
you must "teach" the database to make that same determination.
 
Z

zaps via AccessMonster.com

Thanks Ken. I think I can use the fields ServiceDate and ServiceNumber
together as a primary key. Is that possible? Can i have more than one field
as a primary key?
You'll need to disable the button in your form based on some "decision" that
the database can make that shows that the data will be duplicated if you
import it again. If you don't have a primary key that is based on or
contained within the data in the EXCEL worksheet, then how do you know when
you have duplicate data? However you are able to decide that, that is how
you must "teach" the database to make that same determination.
Hi Everyone.
[quoted text clipped - 12 lines]
Thanks,
Zaps
 
K

Ken Snell \(MVP\)

Yes, it's then called a composite primary key.

You create it by opening the table in design view, highlighting both fields
(using the record selector along the left side of the field name, and using
the Ctrl key to select multiple rows), then click on the Primary key icon in
the toolbar.

--

Ken Snell
<MS ACCESS MVP>

zaps via AccessMonster.com said:
Thanks Ken. I think I can use the fields ServiceDate and ServiceNumber
together as a primary key. Is that possible? Can i have more than one
field
as a primary key?
You'll need to disable the button in your form based on some "decision"
that
the database can make that shows that the data will be duplicated if you
import it again. If you don't have a primary key that is based on or
contained within the data in the EXCEL worksheet, then how do you know
when
you have duplicate data? However you are able to decide that, that is how
you must "teach" the database to make that same determination.
Hi Everyone.
[quoted text clipped - 12 lines]
Thanks,
Zaps
 

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