MkIIISupra
Programmer
I have a table with 2571 records of which many have the same name. This table is based off of an Oracle DB that I can only read and not modify. Anyhow my constraints are as follows:
Len = 13
Type = Text
Cannot be Same
I am trying to loop through and make a simple change to each duplicate, like drop off 1 or 2 of the last chars based on Len. But I can't seem to get it to work.
There are some instances where I have 2 dupes and those work fine, but if there is 3 or more then I can't get the changes to take effect. Either I am really tired or I dunno what! Here is a sample of come of the code I have been trying to use.
I probably could use a StrComp, but I have had little success with it as well...
Thanks for any help you can give!
One by one the penguins steal my sanity!
Len = 13
Type = Text
Cannot be Same
I am trying to loop through and make a simple change to each duplicate, like drop off 1 or 2 of the last chars based on Len. But I can't seem to get it to work.
There are some instances where I have 2 dupes and those work fine, but if there is 3 or more then I can't get the changes to take effect. Either I am really tired or I dunno what! Here is a sample of come of the code I have been trying to use.
I probably could use a StrComp, but I have had little success with it as well...
Code:
Dim cnt As Integer
Dim a As String ' a is used to hold initial value.
Dim b As String ' b is used to drop 2 off
Dim c As Integer ' is a len val
a = Me.GISNAME.Value
DoCmd.GoToRecord , , acNext
Do
If (Me.GISNAME.Value) = a Then
c = Len(Me.GISNAME) - 2
Me.GISNAME.Value = Left$(Me.GISNAME, c)
a = Me.GISNAME.Value
ElseIf (Me.GISNAME.Value) <> a Then
a = Me.GISNAME.Value
End If
cnt = cnt + 1
DoCmd.GoToRecord , , acNext
Loop Until cnt = 2571
Thanks for any help you can give!
One by one the penguins steal my sanity!