>>I have done some testing since this post. The code works great when I test the class by it's self. This makes me think it’s an environment issue. This project was a VFP6 project and I'm updating it to VFP9.
>
>The first thing I owould do is put the view's name in the requery() call;
>
>Requery("View1")
>
>See if that fixes it. View1 may not be the selected work area when the requery is executed.
Jim. I just thought you might like to know what this issue turned out to be. I traced it back to the addobject method. You get some weird behavior when you add ole control directly to a class without first subclassing. The VFP9 ADDOBJECT help states:
If you plan to distribute run-time applications which add ActiveX Controls requiring License key information (for example, Microsoft Treeview and Listview controls), you should not use the AddObject(.....cOLEClass) method. Instead, create and save a subclass of your ActiveX Control to a VCX class library. Then, at run time you can use the AddObject (or NewObject) method to add this OleControl class containing your control.
I was using the MS treeview control. After I subclassed the view started working.
BTW I'm sure you don't remember but You were my VFP instructor in San Francisco back in 1992.
Thanks for your continued support of this excellent product!
Thanks in advance or I hope this helps!
[STS]
:>