Local lcFile As String, ; lcImageName As String, ; lcImagePath As String Select ImgMarca && My cursor name m.lcImagePath = ([\\127.0.0.1\imagens\]) Scan m.lcImageName = Alltrim(ImgMarca.campo) + [.jpg] m.lcFile = m.lcImagePath + Forceext(m.lcImageName, [jpg]) If Adir(laDummy, m.lcFile) = 1 Replace u_imgMarca With m.lcFile Else Replace u_imgMarca With [] Endif Endscan>Hello comunity
>select ImgMarca && My cursor name >scan >ImagePath = ('\\127.0.0.1\imagens\') >ImageName = alltrim(ImgMarca.campo)+'.jpg' > > >if NOT empty(sys(2000,"ImagePath+ImageName")) > replace ImgMarca.u_imgMarca with alltrim(ImagePath+ImageName) >else > replace ImgMarca.u_imgMarca with '' >endif >endscan >>