PDA

Click to See Complete Forum and Search --> : trimming blank fields to 0


dbowling
Nov 7th, 2000, 03:17 PM
hello

i am converting one file to another from an old dos program and the old file has some empty fields that i don't want in the new file. i have been able to convert the file but it brought all the empty fields. i tried these statements with not results Please help

if trim(Len(Name)) = 0 then skip saving this record
if Len(trim(Name)) = 0 then skip saving this record

neither works Please help

asabi
Nov 7th, 2000, 05:45 PM
Well, the second one should have worked, but it might be that there is a hidden character there, so you can't see it, but it still counts in the len ..

try adding:

replace (name,vbrclf,"")
for counter=0 to 32
replace (name,chr(counter),"")
next

if isnull(trim(Name)) then skip saving this record
if trim(Name) = "" then skip saving this record

Hope it helped ..