nolihayati isma
7th April 2016, 05:46
Hi All,

Thank you in advance

How i can remove space from cbrn in selectdo. Because currently which i compared both word below, there is no result displayed because the data is different. I want the cbrn format as "4362A" which is without " "

cbrn = " 4362A"
ncla = "4362A"

Ajesh
7th April 2016, 06:46
what you can do is


cbrn = shiftl$(strip$(cbrn))


Shiftl$ shifts the string to its left, meaning it wont have any leading spaces and strip$ means it will remove the trailing spaces from the string.Something like

cbrn = " TestData "

strip$(cbrn) will lead to , cbrn = " TestData"

and shiftl$(strip$(cbrn)) will lead to cbrn = "TestData"

Hope this is what you want.

sam291091
7th April 2016, 07:20
Hi,
you can also use following code. Trim$ is used to remove space from both side left and right.

cbrn.new = trim$(cbrn)

nolihayati isma
8th April 2016, 06:38
Ajesh

Your solution workable. Thank you so much