Highlighted
Absent Member.
Absent Member.
1057 views

[archive] Message box with validation.

[Migrated content. Thread originally posted on 04 December 2007]

Ok, here's what I'm trying to do. I have a field that I'm trying to validate against a data file. The user enters in a number and it looks in the data file to see if that number exists. If the number is not on file, I want to display a message box type MB-YES-NO that will ask if they want to add that record. The problem that I'm having is that no matter what I try it will not let me advance to the next field if the user selects the "Yes" button. I have experimented with this and it seems that no matter if you do an event MSG-Validate or an "after procedure" and display a message box, it will not advance to the next field.

I have tried doing different event-actions. I've tried using accept-control and even a combination of both and no matter what I do, it will not advance to the next field.

What I ended up doing was to create a new floating window with the error message on the screen and buttons for "Yes" and "No" and calling that.

I have searched the forums here and found nothing. I have searched through the manual and found nothing that relates to this. So I guess my question is, does anybody have a way around this behavior? I like using the "DISPLAY MESSAGE BOX" function as it allows pressing a single key for "Yes" or "No", plus, it is a cleaner look for displaying messages.
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Message box with validation.

I am not compltely sure I understand your problem - but I attach a simple program with two input fields. If the first field is greater than 55 it will ask if you want to create or not, if no it will remain on the first field for input, if yes it will proceed to the next field. Is this what you were trying to do?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Message box with validation.

I tried doing the move 1 to ACCEPT-CONTROL AND 2 TO CONTROL VALUE and it doesn't move to the second field after doing a "DISPLAY MESSAGE BOX"

I forgot to mention, I using 7.2.1 runtime, so I'm not sure that it might be related to that.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Message box with validation.

Would you happen to be able to illustrate the problem with a small example program?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.