Fix / Inspect adding records

Euroboy

Active Member
Hi List,

Hope one of you can help me.

I am working on a FIX/INSPECT form that is adding records when I click the OK button. Thats okay, but under certain circumstances I want to redisplay the screen with new values (the user will have to click OK again to finally add the details to file). So I've tried lost of things but to no avail. The only option I'll mention here that Ive tried (but honest Ive tried loads - some being just a way to try and trick the program) is to add in the STOP PROCESSING system function option in the OK BUTTON CLICKED event rule. I thought that should do it - but no. The details get added to file and the screen gets redispayed with all fields blank ready for the next set of details.

Has anyone come across this problem and how did they get around it?

Thanks in advance.

OneWorld B733 SP11.3 using Oracle Database
 
Hi Euroboy,
At first I have to tell that I haven't tried my suggested solution below but maybe could work.

1.) Disable the OK Menu/Toolbar exit.
2.) Create a User Defined Menu/Toolbar exit (instead of OK).
3.) Handle your logic in the Button Clicked and/or Post Button Clicked event of your new Menu/Toolbar exit.
4.) My recommandation is that issue the PressButton(HC OK) and/or PressButton(HC Cancel) system function calls in the Post Button Clicked event of your new Menu/Toolbar exit.

If pressing OK/Cancel does not work calling it by the above mentioned method then you can try the following to:

a.) Enable/Disable the buttons instead of PressButton calls.
b.) Set a flag instead of PressButton calls and issue a SuppresAdd call in the AddRecordtoDB-Before event of the form based on the flag value.
c.) Experiment with the combinations of the above mentioned method.

Please, let us know your results on the List/Forum in any case. Thx.

Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Back
Top