Update form without Save

Does anyone know how to move to another record on a form, without the Form trying to save the record? What is happening is that a user enters some information on a form - then runs a number of other functions, one of which deletes the record. When you try to move off that record (find(’-’)) it trys to save back to the database and gets an error. I tried to CLEAR the rec variable before moving on but then I got the ‘Do you want to rename the record?’ message.

To be honest it sounds to me that you should change the design. Can you tell us more details about what you are trying to accomplish and then I can try to suggest a different approach. Cristi

As I recall you could enter - if “don’t update condition” then exit(false) - in the OnModifyRecord trigger of the form. On the other hand I would probably agree with Christian on the design issue.

I would love to change the design, but I can not. We are designing the system for a Call-Centre so the forms have to be very specific (and not allow the user to do too much). What we have is a form for a Contact Account and a subform for all their order requests (get turned into orders at a later stage). There is a button on the Main form to post the current line in the subform. This needs to be on the Main form as it needs to update some details on the Main form (please don’t suggest Timer triggers as this is not a good option for many other reasons). I didn’t think this would be too complicated but something in my design is making this message pop up all the time.

Nikolai, the CurrForm.UPDATE function accepts a boolean parameter that tells it whether the current record is to be saved or not. Maybe you can use this? Call your posting function (which, as a side effect, deletes the current record), and afterwards call UPDATE(FALSE).

Hi, instead of clearing the record set it to the previous one by rec := xrec; Torsten

quote:


Originally posted by wlgnles
Does anyone know how to move to another record on a form, without the Form trying to save the record? What is happening is that a user enters some information on a form - then runs a number of other functions, one of which deletes the record. When you try to move off that record (find(’-’)) it trys to save back to the database and gets an error. I tried to CLEAR the rec variable before moving on but then I got the ‘Do you want to rename the record?’ message.