Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Comparing Data
Message
De
11/10/2000 18:54:58
 
 
À
11/10/2000 18:34:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00428208
Message ID:
00428219
Vues:
10
>I have 2 textboxes on a form wich controlsources are related with the same table (as it's obvious, different
>fields each). From a Combobox i set the the value of the TextBox #1 and manually, set the value for the
>textBox #2. When i do this i have to check the second TextBox's value to be higher than zero and lower
>or iqual than the first TextBox's value.
>
>The problem is that it checks the value correctly, but it does it after i re-enter other value for a second time.
>For example: if #1's value is 10 and #2's 11, it doesn't show me the error message, if a change the value
>(i obviously know that it's wrong), for the correct one, in that moment shows me the messagebox for
>the past error.
>
>I'm doing this at the InteractiveChange method, checking out the fileds values as follows:
>

The InteractiveChange doesn't change the actual value - meaning field value - until the end of the method. That's why it's using the last value and not the current value.
Fire a DODEFAULT() first thing to set the value before going on with the rest of it.

>****************************************************

** add this code here
DODEFAULT()


>IF ncred_items.cantidad_d > 0 AND ncred_items.cantidad = 0
> ?? CHR(7)
> REPLACE ncred_items.cantidad_d WITH 0
> ThisForm.grdNotaCredito.grcCantDev.txtCantDev.SetFocus()
>ELSE
> IF ncred_items.cantidad_d > ncred_items.cantidad
> =MESSAGEBOX(NOTACREDITODEV_LOC, ;
> MB_ICONEXCLAMATION + MB_OK, ;
> BSSOLVER_LOC)
> REPLACE ncred_items.cantidad_d WITH 0
> ThisForm.grdNotaCredito.grcCantDev.txtCantDev.SetFocus()
> ELSE
> ThisForm.txtSubTotal.Value = This.Parent.Parent.nColumnSum
> ENDIF
>ENDIF
>************************************************************
>
>
>Thanks
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform