Jacky,
This will work in all versions of Access.
Copy and Paste the following function into a Module.
Function RemoveChar(FieldIn As String) As String
Dim intX As Integer
Dim intY As Integer
intY = 1
Dim NewString As String
intX = InStr(1, FieldIn, "-")
Do While intX <> 0
NewString = NewString & Mid(FieldIn, intY, intX - intY)
intY = intX + 1
intX = InStr(intY, FieldIn, "-")
Loop
NewString = NewString & Mid(FieldIn, intY, Len(FieldIn) - intY + 1)
RemoveChar = NewString
End Function
======
You can call it from a query:
NoHyphens:RemoveChar([ItemName])
--
Fred
Please reply only to this newsgroup.
I do not reply to personal e-mail.
"Jacky11" <my*****@hotmail.com> wrote in message
news:46**************************@posting.google.c om...
Thanks for your response
I have Access 2000
The only thing I want to remove is the -
The above code didn't work for me.
"Fredg" <fg******@att.net> wrote in message
news:<p%***********************@bgtnsc04-news.ops.worldnet.att.net>...
Since you haven't mentioned which version of Access you're using, I'll
assume the latest.
NoHyphens:Replace([ItemName],"-","")
--
Fred
Please reply only to this newsgroup.
I do not reply to personal e-mail.