Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ControlSource X Value
Message
From
14/12/2000 11:02:51
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00453209
Message ID:
00453399
Views:
16
>ThisForm.KeyPress:
>If nKeyCode = -7 && F8
> MessageBox("Value: "+ThisForm.TextBox.Value)
> MessageBox("Table.Field: "+Table.Field)
>EndIf

Like Trey said, nothings been written to the field yet, thats an advantage so you can cancel the change by hitting Esc without needing to revert the record anythign.

Two traps with this methodology however, is that if you use a toolbar button to do something things, you have to remember that Toolbars don't recieve focus, so if you access Table.Field from the toolbar, it still may not reflect the changes in teh textbox.

And the other one is, try refresh()ing the form when the hit F8. Since the TB value is differnet than the field value, the Refresh() will set the TextBox BACK to the field value because it has'nt been committed yet.
Previous
Reply
Map
View

Click here to load this message in the networking platform