Thread: VBA duplication
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Keith74 Keith74 is offline
external usenet poster
 
Posts: 120
Default VBA duplication

Run a query on the table prior to the insert to see if the name
already exists then use that result to determine if to run the insert

i.e.


SELECT ClientName FROM MyTable WHERE ClientName = 'Joe Bloggs'

<code to run query

If myRecordsSet.BOF = True and myRecordsSet.EOF = True then
<INSERT sql statement
end if

hth

Keith