COMMIT PROBLEM [message #231634] |
Tue, 17 April 2007 15:33 |
dmack
Messages: 42 Registered: March 2005 Location: TNT
|
Member |
|
|
Hi All
I have been checking the various threads with regards to this problem and they did provide some insight however none of them addressed my problem sufficiently. I have a form with two fields. however the user is only allowed to save data populated by one of these fields not both i.e. either OR (the corresponding code prohibits this on the When_button _pressed trigger).
If the user should exit the form however
the message : "Do you want to save the changes you have made" comes up, as it is supposed to,because the form status has changed the problem is, if the user says yes the data is saved to the database anyway. this should not happen.
Can anyone offer advice on how to get around this.
|
|
|
|
Re: COMMIT PROBLEM [message #231778 is a reply to message #231662] |
Wed, 18 April 2007 07:03 |
dmack
Messages: 42 Registered: March 2005 Location: TNT
|
Member |
|
|
There was no error, the form prompted me as it was supposed to. However While I restricted the user from saving both records simultaneously using the trigger, they are able to get around this by closing the form and when prompted save changes are allowed to by saying yes. How can I avoid this, I thought about a database trigger but this should be my last resort any suggestions please
|
|
|
|
|
Re: COMMIT PROBLEM [message #232271 is a reply to message #232181] |
Fri, 20 April 2007 00:09 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Aaahhh!! When the user places data in a field block the other field and that way they can not PUT data into both fields! Alternatively, have a validate trigger on the items and the block so that it fails when there is data in both fields! This sort of ssituation needs to be caught way before you get around to commiting the data.
David
|
|
|