Hello,
i have table like below which i am importing from Excel to tbl_temp_Dokumenty:
Numer |
Dokument |
Obowiązkowy |
1 |
Wniosek o zatrudnienie |
TAK |
2 |
Kwestionariusz kandydata |
NIE |
3 |
Kwestionariusz pracownika |
TAK |
|
|
|
|
|
|
Number is a number of Document, Document is document name and Obowiązkowy is isNecessary.
Now my update query is:
SQL:
Code:
UPDATE tbl_slow_Dokumenty INNER JOIN tbl_temp_dok ON tbl_slow_Dokumenty.Numer = tbl_temp_dok.Numer SET tbl_slow_Dokumenty.Obowiązkowy = [tbl_temp_dok].Obowiązkowy, tbl_slow_Dokumenty.Dokument = [tbl_temp_dok].Dokument;
Picture:
So i am updating my tbl_slow_Dokumemty using Number as common field within inner join.
It is okey... but problem is that users can change manually Numbers in table in Excel and if they write for example 3 times the same number : my update query would take the last Dokument name (it is appropriate working, my query will work here fine).
So question is how to prevent duplicates inputed by user?
Using update query only using text field and delete numbers? (it is dangerous way because users can have duplicates document names (spaces or strange sings in the end of cell)
or maybe check by Access if there are duplicates in tbl_temp_dokumenty and if yes exit macro with msgbox message?
Thank you for your help,
Best Wishes,
Jacek