UPDATE query (not update if certain critea exist in the destination table)

homer2002

Registered User.
Local time
Today, 17:40
Joined
Aug 27, 2002
Messages
152
I'm using an UPDATE query, which is run when I click a button on a form.

The update query add to a table with this structure

LETTER CODE - A single Letter
Value - A numeric value
Date - A Date

The table thats being updated should not have any duplicate records in it.
The two fields that should not be duplicated are

LETTER CODE and DATE

so if the destination has

LETTER CODE = A &
DATE = 01/01/01

then no records should be able to be added that contain this.

(it seems like a multi field no duplicates index kinda thing, but I don't know how to control it)


any ideas???
 
Can't you set the index of each field to "Yes - No duplicates"

I've not tried it let me hasten to add;)

Col
:cool:
 
I don't think that will work.

the

LETTER CODE field can be duplicated so can the DATE field


but not if they are both duplicated in the same record


LETTER CODE DATE
a 01/01/01
A 01/01/02


is ok to have in the table

but

LETTER CODE DATE
a 01/01/01
A 01/01/01

is not

there should only be one date for each letter code.
 
Oh right - I see now - sorry I got confused there

Col
:cool:
 

Users who are viewing this thread

Back
Top Bottom