[Migrated content. Thread originally posted on 25 August 2004]
Well I am sure that this sounds stupid, but i just cannot see how to get an embedded date validation procedure to operate sensibly.01 scr-main.
03.....
03.....
03 scr-date after procedure validate-date.
05 entry-field pic 99 using day auto.
05 entry-field pic 99 using month auto.
05 entry-field pic 99 year.
only enters the procedure validate-date for the first two 'auto' fields - not for the last one.
01 scr-main.
03.....
03.....
03 scr-date .
05 entry-field pic 99 using day auto
after procedure validate-date.
05 entry-field pic 99 using month auto
after procedure validate-date.
05 entry-field pic 99 year
after procedure validate-date.
This enters the procedure validate-date for all three elemental fields.
BUT - what I really want is for the after event procedure to only activate after the group field entry is finished i.e. only go to the procedure when leaving entry of the whole group field scr-date, otherwise I am dealing with incomplete date entry without knowing which field the operator has possibly clicked off to. So changing an initial dd/mm/yy date 300904 to 311004 makes my procedure validate after the day 30 is entered and gives an error for date 310904 - because i do not know that the next field to be entered is the month field. Control-value does not seem to help as it points at the terminating field, What on earth am I doing wrong here? It seems such an easy requirement and yet I just can't see how to do it - although it is late now and I'm tired. Hope someone can help.



