Append Query question

  • Thread starter Thread starter Erik
  • Start date Start date
E

Erik

I am attempting to use an append query but would like to
have input on how to ensure the uniqueness of record
prior to appending. My problem probably lies in
structuring a unique key for checking purpose. The two
unique field are Date and Name.

What would be the proper way to proceed? Thanks for
taking the time to read and/or answer this question.
 
Erik,

Do you mean that a Date can be repeated within the data, and a Name can
be repeated in the data, but you can't have the same Name on the same
Date twice? If so, in the design of the table, select Indexes from the
View menu, enter a name for your index in the Index Name column, and
enter the Name and Date fields in the Field Name column, and set the
Unique property to Yes. Then, your Append Query will automatically
exclude any records where that Name/Date combination already exists in
the table being appended to.

By the way, as an aside, the words Name and Date both have a special
meaning is Access (they are classified as 'reserved words'), and as
such, they should not be used as the name of a field or control or
database object. I recommend changing them.
 
Steve

Thanks, I applied the index and it works great. By the
way, Date and Name were just used as an example, not the
actual field names. I do appreciate the advice.

Erik
 
Back
Top