Clear screen after ADD

Its not on sale

Reputable Poster
Hi there,

I am pretty sure this is a very easy question.

I am working on a custom form and before the form writes the data to the database I do some checks and if things are invalid I set control errors.

Issue is that when control is written to the form, error occurs but whole form is initialized and all fields are all blank. I want the form to hold the values and error should appear on the error fields.

I tired putting conditional Stop process on all different places but screen gets initialed all the time.

I dont have lot of ER in this custom form. I was wondering how would I do that.

Regards
 
Hi Naveed Rahim,

Some questions:

Q1.) What kind of type form are you working on (Fix/Inspect, Header or Headerless / Detail)?

Q2.) In wich even do you issue the SetControlError system function call? Do you issue it in the Button Clicked event of the OK button or elswhere?

Read you later,

Zoltán
 
Its a fix Inspect form.

I put it at Add record to DB- before and clear screen after ADD. Just now I also put it at OK button.

They are all conditional. If the error flag is on, stop processing.

But it goes on and clears the screen and then turn the fields red. Interestingly in add recod to databas- Before has a suppress add thing which is working but the screen always gets cleaned.

I wonder why.
 
Hi,

IMHO Add record to DB- before and clear screen after ADD events are not the best place to handle potential errors.

I suppose, it will work in the Button Clicked event of OK button.

Please, let us know how does it work in the above mentioned event.

Regards,

Zoltán
 
Thanks a Million.

It sure work on the OK event.

I am kinda surprise that OK ER comes first then the ARTDB-Before. TO me that should be first but I am wrong.

Thanks again Zoltan.

Regards.
 
Hi,

Glad to read that your issue have been solved.
Just a final information:

If you have trouble with the sequence of events on a form then please, check the Appendix B in the Development Tools manual. You will find there the Process Flow for all form types.

Regards,

Zoltán
 
Back
Top