This is in regards to the last thread marked "Allow Additions". I have come across an interresting phenomena now that I can't really discern how it is working.
I set the form to allow additions but I set the tab cycle property to same record, and also removed all navigation, and record selectors. This all worked great using Philly44's idea of using DELETE sql to clear the table before INSERT INTO the data that is kept in the two text boxes on the form.
Now comes the strange occurance. If I load the form and change both text boxes to something and click DONE (the button to run my two SQL lines.) The code works perfectly, first deleting the table, then adding in the values from the text boxes. This effectively keeps the table at only one record which is our current record.
Now if I come back into the form, see that the values in there are correct and choose not to edit any of them and simply click Done. The first sql is ran, deleting all entries from the table, then the INSERT INTO runs and inserts blank data into the fields. I am curious to why under the first scenario the DELETE sql didn't seem to delete what was in the text boxes, but under the second scenario it clears the table and the text boxes as well.
If you have any suggestions or input on this problem I'd appreciate it. If you don't understand what I'm talking about try reading the short thread from earlier today labeled "Allow Additions". I would like to code some kind of fix so that the end users would not be able to cause this kind of bug.
I set the form to allow additions but I set the tab cycle property to same record, and also removed all navigation, and record selectors. This all worked great using Philly44's idea of using DELETE sql to clear the table before INSERT INTO the data that is kept in the two text boxes on the form.
Now comes the strange occurance. If I load the form and change both text boxes to something and click DONE (the button to run my two SQL lines.) The code works perfectly, first deleting the table, then adding in the values from the text boxes. This effectively keeps the table at only one record which is our current record.
Now if I come back into the form, see that the values in there are correct and choose not to edit any of them and simply click Done. The first sql is ran, deleting all entries from the table, then the INSERT INTO runs and inserts blank data into the fields. I am curious to why under the first scenario the DELETE sql didn't seem to delete what was in the text boxes, but under the second scenario it clears the table and the text boxes as well.
If you have any suggestions or input on this problem I'd appreciate it. If you don't understand what I'm talking about try reading the short thread from earlier today labeled "Allow Additions". I would like to code some kind of fix so that the end users would not be able to cause this kind of bug.