Hi Moises!
>The code below is from a fried of this forum
>It get´s all e-mail from a field off DBF and
>store them to a variable.
>How can I get only e-mail from state = "XX"
>Regards
>Moises
>
>m.YourEmails = ''
>Select correios_rec
>goto 1
>*Scan For !Empty(correios_rec.E_mail1)
> scan
> m.YourEmails = m.YourEmails + alltrim(correios_rec.E_mail1) + '; '
>EndScan
>_ClipText = Iif(Empty(m.YourEmails),'',SubStr(m.YourEmails,1,Len(m.YourEmails)-2))
Try this:
m.YourEmails = ''
Select correios_rec
goto 1
scan
If correios_rec = "XX"
m.YourEmails = m.YourEmails + alltrim(correios_rec.E_mail1) + '; '
Endif
EndScan
_ClipText = Iif(Empty(m.YourEmails),'' ;
, SubStr(m.YourEmails,1,Len(m.YourEmails)-2))
You can also to use "Select SQL clausule" and to select only the datas for state = 'XX'.
Bye!
Erick
Força Sempre!
Strength Always!