Yes, Jack, I agree - when Ira responds, to include a few others as well, I sit up.
But I found the problem!!!!!!!!!!!!!!
I noticed on the same troublesome form that when I pushed another button that deleted the record, when I used the functions, they worked like lightning, and perfectly, and i was able to put everything in order
- please note that since Selwyn said to put parentform.close() as the last line in any script, not leaving any commands to follow, I found that where I was having one computer crash and not another, that that was the problem!
on the save button, the first command was parentform.commit()
I moved the commit() command to the onarrive event for the button, and all of a sudden everything works perfectly -
....parentform.commit() ... moved to on arrive
cnum=parentform:cust_number.value
fixone(cnum)
uponebalance(cnum)
form.view("master form")
parentform.close()
this is my conclusion: (correct, maybe?!!)
when i say form.commit() and then call the functions, i think there is a time when alpha is updating the indexes for the set at the same time the functions are opening the files and manipulating them - thus one of the errors [can't find the file].
so, if I am correct, then it is a timing issue, but not one there wasn't an easy fix for.
i also think that by putting the scripts in functions instead of script_play's, that that stopped timing issues between the two scripts
i need two functions as in some instances i call one, and in others i call both
But I found the problem!!!!!!!!!!!!!!
I noticed on the same troublesome form that when I pushed another button that deleted the record, when I used the functions, they worked like lightning, and perfectly, and i was able to put everything in order
- please note that since Selwyn said to put parentform.close() as the last line in any script, not leaving any commands to follow, I found that where I was having one computer crash and not another, that that was the problem!
on the save button, the first command was parentform.commit()
I moved the commit() command to the onarrive event for the button, and all of a sudden everything works perfectly -
....parentform.commit() ... moved to on arrive
cnum=parentform:cust_number.value
fixone(cnum)
uponebalance(cnum)
form.view("master form")
parentform.close()
this is my conclusion: (correct, maybe?!!)
when i say form.commit() and then call the functions, i think there is a time when alpha is updating the indexes for the set at the same time the functions are opening the files and manipulating them - thus one of the errors [can't find the file].
so, if I am correct, then it is a timing issue, but not one there wasn't an easy fix for.
i also think that by putting the scripts in functions instead of script_play's, that that stopped timing issues between the two scripts
i need two functions as in some instances i call one, and in others i call both
Comment