Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field Validations VS Validation Procedure
Message
From
17/04/1998 00:55:12
 
 
To
16/04/1998 15:15:38
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00092654
Message ID:
00092762
Views:
20
Here is my only Idea right now. There is a Genscrnx driver that keeps track of the lastobject that you where on - I don't think it would be to hard to do this with out genscrnx just in the VALID have a var -= _curobj. Now in the WHEN of the other object call a function that would do the valid passing the lastobj that you where on, except in the cancel button. if you didn't want them to leave have your function return .F. for the when and set the _curobj back to lastobj.

Charles

>These are the 2 scenarios I have come up with - neither of which is what I want to occur (although a combination of the 2 of them is what I want to occur, but I can't figure out how to accomplish it).
>
>1a) The user adds a record, the first field is blank and the user selects the 'Cancel' button.
>Result: The message 'Edits Canceled' is displayed and the record before the Add button was selected is displayed. This does exactly what I want it to do.
>
>1b)The user adds a record, the first field is blank and the user selects the 'Save' button.
>Result: The message 'Field Can't Be Blank, Try Again' is displayed first, then the message 'Edits Canceled' is displayed. At this point the user is not able to go back and edit the blank field but once again the record before the Add button was selected is displayed. If the user selects the 'Save' button, I want the user to have the ability to edit the record instead of being forced out of the 'adding' mode. This is NOT what I want it to do.
>
>OR
>
>2a) The user adds a record, the first field is blank and the user selects the 'Cancel' button.
>Result: The message 'Field Can't Be Blank, Try again' is displayed. The focus is on the 'Cancel' button where the user must select the 'Cancel' button again to actually cancel the transaction. If the 'Cancel' button is selected, I do not want an error message to be displayed. This is NOT what I want it to do.
>
>2b) The user adds a record, the first field is blank and the user selects the 'Save' button.
>Result: The message 'Field Can't Be Blank, Try Again'. The focus is on the 'Cancel' button where the user must select the 'Cancel' button, but the user still has the opportunity to edit the record. This does exactly what I want it to do.
>
>I somehow want my solution to be (1a) and (2b) but I am unable to figure out how to get these to work at the same time. Any suggestions would be greatly appreciated.
>
>One more tidbit of information. I have field level validations for the various fields where the field can't be empty. I also call a procedure once the 'Save' button is selected which basically duplicates the field level validations in one procedure. This was necessary since the users do not necessarily tab from one field to the next.
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Previous
Reply
Map
View

Click here to load this message in the networking platform