Normal Topic unwanted save (Read 838 times)
olddog
Member
*
Offline



Posts: 35
Joined: Jan 19th, 2008
unwanted save
Jan 8th, 2009 at 3:18am
Print Post Print Post  
i open a form in add mode.  on the form i have button for next and previous program using code builder.  i also have a button to save.  it is programed to check the data on the form and if correct save the record and move to the next new record.  on form start up some of the le are filled in from global values.  i enter multiple records at a time and sometimes realize i have made an error during entry so i backup and fix the errors, still in add mode.  The last record gets saved without having been instructed to do so.  can't figure out why.
  

trying to learn a new trick
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: unwanted save
Reply #1 - Jan 8th, 2009 at 12:59pm
Print Post Print Post  
It's because you are auto-filling the LEs upon form entry. Instead, you should use programming logic to auto-fill the LEs only if a value has been entered into an element (or more than one element) that is usually only filled in manually.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
olddog
Member
*
Offline



Posts: 35
Joined: Jan 19th, 2008
Re: unwanted save
Reply #2 - Jan 18th, 2009 at 1:24am
Print Post Print Post  
thanx for the explanation.   unfortunately the prefilled le are needed to fill in the rest of the le

i found a work around.  on closing the form i search for and delete the incomplete records
  

trying to learn a new trick
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: unwanted save
Reply #3 - Jan 18th, 2009 at 3:02am
Print Post Print Post  
olddog wrote on Jan 18th, 2009 at 1:24am:
thanx for the explanation.   unfortunately the prefilled le are needed to fill in the rest of the le

i found a work around.  on closing the form i search for and delete the incomplete records

You may want to wait to prefill those LEs until some other LE has been filled by the user (indicating that they really want to make a new record as opposed to just browsing through) instead of doing it On Form Entry.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: unwanted save
Reply #4 - Feb 3rd, 2009 at 11:08pm
Print Post Print Post  
I do have form which fills certain element on form entry, the way I handle this problem is, I require certain elements to have value before it could be saved. When I hit F9 or previous button, it will not take me there, instead give me flag that the record cannot be saved. I can delete the incomplete record for the time being (this will directly take me to previous saved record) to goto the previous record. This might not be the best way, but it will not save incomplete record and still you browse through your completed records either in add mode or update mode. Am I making sense?
« Last Edit: Feb 4th, 2009 at 6:16am by Bharat_Naik »  
Back to top
 
IP Logged