1 Replies - 183 Views - Last Post: 30 June 2014 - 05:19 AM Rate Topic: -----

#1 LindseyA  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 30-June 14

Append record only if record doesn't already exist

Posted 30 June 2014 - 04:57 AM

I am new to MS Access and have a few tables all with Company Name and Date (other fields are completely different). I would like to create a query to append a new record to all tables only if that record (the two fields--Company Name and Date) don't already exist. The company name can be duplicated but not the company name and date. So if it has the same company name and a new date then I'd want it to add the record but if they both already exist together then I do not..... any help would be greatly appreciated.

Is This A Good Question/Topic? 0
  • +

Replies To: Append record only if record doesn't already exist

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6063
  • View blog
  • Posts: 23,517
  • Joined: 23-August 08

Re: Append record only if record doesn't already exist

Posted 30 June 2014 - 05:19 AM

They right way to do this would be to create a multiple-field (no duplicates) index on the Company Name and Date, so if you try to insert a field with the same Company Name and Date, the insert will fail.

https://office.micro...210347.aspx#BM2
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1