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.
HTH
>
>I'll probably slap myself in the head once I get the answer, but I guess I have to ask.
>
>Thanks in advance.
-=Gary