Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BeforeRowColChange
Message
From
20/03/2006 11:44:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
BeforeRowColChange
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01105888
Message ID:
01105888
Views:
89
Sometimes it seems that the controls have not updated their controlsource by the time this event fires. I have a grid where I want to validate that the 4 fields add up to zero but not all time it works.

Simplified code
PROCEDURE BeforeRowColChange 
LPARAMETERS nColIndex

ln_paid = payment + discount + writeoff
IF ln_paid > ac_arapl->balance
  =MESSAGEBOX('out of balance')
  NODEFAULT
ELSE
  =DODEFAULT(nColIndex)
ENDIF
When I trace though the table values are updated but if I let it run and debug out the ln_paid var it's like the last field I changed before I arrowed down into the next row isn't updated yet. I tried the FLUSH command but it didn't work either.
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Next
Reply
Map
View

Click here to load this message in the networking platform