Xenix
Registered User.
- Local time
- Today, 16:32
- Joined
- Oct 8, 2001
- Messages
- 124
I have written this function to remove all "-" or spaces in a string and it seems to work fine. But as I go record by record and remove them it don't seem to store them in the table
here is my code:
any help you can give me will be most helpfull.
Thank you in advance
Mike
Code:
Private Sub Remove_hyphens_Click()
On Error GoTo Err_Remove_hyphens_Click
Set db = CurrentDb
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.MoveLast
rs.MoveFirst
Do While Not rs.EOF
Me.PartNumber = RemoveSpacesAndDashes(rs.PartNumber)
Me.Refresh 'try to force a save here
MsgBox Me.PartNumber 'just check to see if all is well
rs.MoveNext
Loop
Exit_Remove_hyphens_Click:
Exit Sub
Err_Remove_hyphens_Click:
MsgBox Err.Description
Resume Exit_Remove_hyphens_Click
End Sub
any help you can give me will be most helpfull.
Thank you in advance
Mike
Last edited by a moderator: