Options

How to put an ERROR('something') into subform

uri84uri84 Member Posts: 30
Hi,


I'm trying to put an ERROR message inside a subform that i have.


IF (TipoFact = TipoFact::Factura) THEN
BEGIN
IF ("Payment Method Code" = 'CONTADO') THEN
BEGIN
IF (Nombre ='') OR (Direccion = '') OR ( Poblacion='') OR ( Rut = '' ) THEN
BEGIN
ERROR ('incomplete');
EXIT;
END
END;
.....

when i press OK in the form and executes this part of code it show me before de error messsage, another error that say :"It's not possible to close the subform sales ..... because the system is busy" or something like that , and you click ok in this dialog en shows the error message.

how can i put an error here?

Comments

  • Options
    SavatageSavatage Member Posts: 7,142
    How are you executing this code?

    What trigger?
    uri84 wrote:
    or something like that
    - give complete error message - this is useless

    Have you tried searching the forum for "mandatory fields"

    You shouldn't code on forms - use the table
  • Options
    SogSog Member Posts: 1,023
    Why is the "EXIT" after the error?
    Error alone is enough.
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
Sign In or Register to comment.