Gary-
When I tried your suggestion, it always seems that the actual workarea is one tab behind. That is, if I go from Services to Doctors, thisform.cworkarea = "Services" on the doctors page and soforth. If I then go from doctors to billedto, thisform.cworkarea = "Doctors", so the property is changing just not when I think it will. This was actually where I was just when I wrote the original note.
There just doesn't seem to be a way to put them in synch. If that's the case, I'll send a note to Dave Lehr to see if he can help.
>Hi Steve:
>
>>I want to use 1 set of navigation, new, revert, delete, and save buttons for the screen.
>
>OK.
>
>>My question is: how do I "select" the appropriate table when the page is changed so that the navigation is in the correct table, when I add records, they would be added to the correct table, etc? When I set the cworkarea in the Form, that table stays the selected table for the entire screen.
>
>The best way to do this is to put some code in the pageframe's "AfterPage" method. This event occurs after when a new page is activated. It also occurs when the first page is activated when the form instantiates. So, in this event, just reset the form's cWorkarea dependent on the value of the events nPage parameter.
>
>
>Lparameter nPage
>do case
> case nPage == 1
> thisform.cWorkarea = 'Services'
> case nPage == 2
> thisform.cWorkarea = 'Providers'
> otherwise
> thisform.cWorkarea = 'Doctors'
>endcase
>
>
>You could also specify the cWorkarea properties in the buttons too, but the form's cWorkarea property is the way to go. There are a number of ways to achieve this, but this should give you the idea. For more info, look at the section on pageframes in the 6.1 guide.
>
Steven Herbin
SNH Computing Corporation
Swan Lake, NY