Hello
I need some help and wondering if anyone will be able to help me on this:
I need to import Access tables, through a form (using procedures)
Some tables have composite primary keys ..with 3 to 4 fields. together making the primary keys. like field name : "XID", and "distanceFrom" and "distanceTo" makes one composite primary key.
in that case how can I check to make sure no duplicate records are imported.
I have used the code below to check the Sample_Number as being the primary key for a database but i have to check the "XID", and "distanceFrom" and "distanceTo" at the same time in a record for another database. How can i do that? Sometimes I have to have 4 fields altogether to check.. in a record.
The codes below is what I have used to check duplicates for one key in a record.. and it works perfectly but now i have to do that checking for a composite key
rs.FindFirst ("Sample_Num='" & rsetext.Fields("Sample_Num") & "'")
If (rs.NoMatch) Then
rs.AddNew
Can anyone help..
thanx
I need some help and wondering if anyone will be able to help me on this:
I need to import Access tables, through a form (using procedures)
Some tables have composite primary keys ..with 3 to 4 fields. together making the primary keys. like field name : "XID", and "distanceFrom" and "distanceTo" makes one composite primary key.
in that case how can I check to make sure no duplicate records are imported.
I have used the code below to check the Sample_Number as being the primary key for a database but i have to check the "XID", and "distanceFrom" and "distanceTo" at the same time in a record for another database. How can i do that? Sometimes I have to have 4 fields altogether to check.. in a record.
The codes below is what I have used to check duplicates for one key in a record.. and it works perfectly but now i have to do that checking for a composite key
rs.FindFirst ("Sample_Num='" & rsetext.Fields("Sample_Num") & "'")
If (rs.NoMatch) Then
rs.AddNew
Can anyone help..
thanx