NetTalk Central

Author Topic: Save a record without leaving the form  (Read 4111 times)

Pauly

  • Newbie
  • *
  • Posts: 26
    • View Profile
    • Email
Save a record without leaving the form
« on: August 23, 2012, 04:03:21 AM »
Hi -
I have a popup form with the first tab containing a number of file fields, and a second tab with a number of local (well,, session) variables and a button.

The form can be open for Changes or Inserts.

When the button on the second tab is clicked, and the record is being inserted (IE; it's not yet saved), I want to save the record as if the 'Save' button had been clicked on the form and the form to stay open, while I do some other stuff in code
Hope I've explained sufficiently.

How do I go about that?

Thanks
Pauly
 

 

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11311
    • View Profile
Re: Save a record without leaving the form
« Reply #1 on: August 23, 2012, 07:29:25 AM »
>>  I want to save the record as if the 'Save' button had been clicked on the form and the form to stay open, while I do some other stuff in code

I don't want to say it's impossible, because of course in code most anything is possible, but it would become extremely complicated to do it exactly as you have described.

In this situation I would personally turn on the option to "Insert record when form opens even if not necessary" (see advanced tab, it's not worded exactly like that, but words to that effect.) This means the record is inserted when the form opens, and everything after that is treated as a "change". This makes it easier to add child records along the way, and ultimately the changes to the form record are saved when the form closes.

cheers
Bruce

charl99

  • Full Member
  • ***
  • Posts: 185
    • View Profile
    • Email
Re: Save a record without leaving the form
« Reply #2 on: August 23, 2012, 07:38:14 AM »
Pauly,

You can always make a Memory Form, simply populate what you want on the form and hand code around it, eg with a 'Save' Button and a 'Save and Exit' Button, etc.

Cheers
Charl