Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Default two fields to the same value
Message
 
To
14/01/1999 02:41:19
Fida Shamsoodeen
Combined Systems (Pty) Ltd
Centurion, South Africa
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00175796
Message ID:
00175827
Views:
33
Can your program tell whether the user is adding or editing? If not, make it be able to tell (like set up a form-level property like prplAdd and make it be True if the user hits the add button on your form).

Assuming that mynumber1 (visible) and mynumber2 (hidden) are the objects, do this in mynumber1's LostFocus, Valid or InteractiveChange event, whichever is most convenient (the InteractiveChange fires with every keystroke & may not be your best bet, but it will update the other object with every keystroke and may be just what you want).

WITH Thisform
.mynumber2.value = .mynumber1.value
ENDWITH

That's it!

JR

>Can anyone please help!!!!
>I have generated a form using the wizard. My problem is I have
>two numeric fields. I want the second field to be hidden on the
>form, and when I Enter something in the first field I want the
>value of that field to be stored in the second field as well but
>only when i create a new record, NOT when I am editing it.
>
>Any suggestions
>
>Thanks
>Fida Shamsoodeen
CLARC Services, Inc.
3500 Tamiami Trail
Port Charlotte, FL 33952
www.clarc.com
(941) 743-0108
(800) 246-5488
Previous
Reply
Map
View

Click here to load this message in the networking platform