Re: Modify duplicate records using VBA code




This is what I want to do.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

OK - Is it a one-time thing? That is,
once you do it, you won't have to
do it again. And, does it matter what
the additional unique identifiers are
that you tack on to the end of the
customer name strings? And last,
do all the records containing cust
name strings have unique index
field values?

Assuming the answers are Yes,
No and Yes respectively. Extract
duped records, outputting only
the [UniqueID] and [CustName]
fields. Using a MakeTable qry
to create the target table would
make this easier. Call it NewTable.
Open NewTable in Design view.
Change the field type of [UniqueID]
to LongInteger if it's AutoNumber.
Add a new field named [ID] to the
table - AutoNumber type. Save the
table. Create a query based on
NewTable, outputting all fields.
Put a calculated field in the query
named [NewCustName] like this...
NewCustName: [CustName] & Trim$(CStr([CustName]))

Run the query. There are your
new customer names. Paste 'em
into a new test copy of your table,
overwriting the previous redundant
values with the new, unique values.

.



Relevant Pages

  • Re: Trouble combining arrays in a table
    ... I'm querying Salesforce.com via their AJAX toolkit and outputting query ... var Account, primaryContact, lastRow; ... var table, thead, row, cell, cellText; ...
    (comp.lang.javascript)
  • Re: Change SQL to allow Memo format rather than only 255 character tex
    ... Then you can define the field type etc. ... Using a MakeTable query, I'm not sure you can force the data type to a memo field. ... FROM AS Tbl ... I know of no way to force the memo field type in the destination table if you are going to manipulate the memo field in the Select statement. ...
    (microsoft.public.access.queries)
  • Re: where to find column name and properties in system tables in a
    ... Allen Browne - Microsoft MVP. ... I do a lot of query manipulation of linked ... I know it has a print statement, ... names and properties like length, field type, etc. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: MySQL Speed
    ... less resource intensive for MySQL. ... $query = mysql_query; ... Field Type Null Key Default Extra ... time timestamp YES CURRENT_TIMESTAMP ...
    (comp.lang.php)
  • Re: Adding Days to a Date
    ... MS Access MVP ... The only way I am able to do this is to change the field type to ... > date/time after I transfer the data and run the above-mentioned query. ...
    (microsoft.public.access.queries)