Define Class Myclass as Custom OLEPUBLIC
Function Init()
Set Exclusive Off
Set Path to whatever_your_path_is
Use Customer Order cust_id
EndFunc
Func GetName(cCust_Id)
Return(Seek(cCust_Id,'Customer'))
EndFunc
Func Destroy()
Use In Customer
EndFunc
EndDefine
Add the prg file to a new project and build it as a Dll
In the calling program
ox = Createobject('yourprg.Myclass')
cCust_Id = 'E12345'
If ox.GetName(cCust_Id)
some code
Else
some other code
EndIf
hope that helps
Pete Kane