Hello in a field every word of every entry ends with a comma. How can I
delete that comma from every word of the field?
Thanks in advance
Dimitris
Ken Snell [MVP] - 09 Apr 2005 19:08 GMT
Depends upon whether there are any commas within the words that you need to
retain, or if you want to just delete all commas. Post some example data
here (include any where you wouldn't want to delete a comma).

Signature
Ken Snell
<MS ACCESS MVP>
> Hello in a field every word of every entry ends with a comma. How can I
> delete that comma from every word of the field?
> Thanks in advance
> Dimitris
Justin Hoffman - 10 Apr 2005 00:58 GMT
> Hello in a field every word of every entry ends with a comma. How can I
> delete that comma from every word of the field?
> Thanks in advance
> Dimitris
You could remove all commas from the field using the replace function to
repalce the comma with a blank string, eg:
Replace(",dog,cat,mouse,",",","")
Returns "dogcatmouse"
... or were there some commas you needed to keep?
Alex Ivanov - 10 Apr 2005 07:06 GMT
This query sould delete only the last comma
update mytable
set myfield=iif(Right(myfield, 1) = ",", Left(myfield, (Len(myfield) - 1)),
myfield)
where len(myfield)>0

Signature
Please reply to NG only. This email is not monitored.
Alex.
> Hello in a field every word of every entry ends with a comma. How can I
> delete that comma from every word of the field?
> Thanks in advance
> Dimitris
Jimmy - 11 Apr 2005 10:00 GMT
Thank you all for your answers.
There are more commas in the field and I only want the last one deleted. The
last one is always at the end. So every entry ends with a comma.
I tried to do what Alex suggested but couldn't make it. I am new in Access
and am not sure where to write everything. I need to ask for more detailed
help, where exactly to write the code. If it helps the table is named
"DEntry" and the field with the data "Dief".
Thank you once again for your help.
Dimitris
> Hello in a field every word of every entry ends with a comma. How can I
> delete that comma from every word of the field?
> Thanks in advance
> Dimitris
Ken Snell [MVP] - 11 Apr 2005 14:49 GMT
Run an update query similar to this:
UPDATE TableName
SET FieldName = Left([FieldName], Len([FieldName]) - 1);

Signature
Ken Snell
<MS ACCESS MVP>
> Thank you all for your answers.
> There are more commas in the field and I only want the last one deleted.
[quoted text clipped - 10 lines]
>> Thanks in advance
>> Dimitris
Jimmy - 11 Apr 2005 17:00 GMT
Thanks for your help Ken. It worked fine.
> Run an update query similar to this:
>
[quoted text clipped - 14 lines]
>>> Thanks in advance
>>> Dimitris