transfer spreadsheet

  • Thread starter Thread starter zaps via AccessMonster.com
  • Start date 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
 
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.
 
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
 
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
 
Back
Top