Nerissa,
>I found something wrong in the code. If you will look at cbizobjmaintbaseform.saverecord() (for OK button) and at cbizobjmaintbase.cancel() (for Cancel button), you will find the code below:
Actually, this code is intentional...typically, when you send a cancel message to the primary business object, you want to go back to page 1 of the page frame. In contrast, if you send a cancel message to an auto-primary business object (which is usually a secondary object), you want to stay on the same page of a page frame.
Obviously, you can override this behavior in your custom forms if it doesn't suit your needs.
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com