Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Visual Foxpro equivalent of Ditto!
Message
From
04/01/2001 15:24:18
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00459224
Message ID:
00459518
Views:
19
>I have a database that has a lot of repetitive data in fields, though nothing that could be set as a default. I am thinking about adding some features to enhance data entry. Is there anyway to have a keystroke that repeats the value from the last record's field value?

I did this by setting keypreview = .T. in my base class for forms, and adding code to the keypress event of the form class to trap ctrl-D (for Ditto!) to call the Ditto method I added to the form class. Then you can override the ditto method for differen data entry forms to be useful to that particular situation. The basic way I did this was to use SCATTER memvar, and then append a record, filling in the certain fields I wanted, since they were not all supposed to be carried forward. (for example you would need to watch out for your primary key!) I also carried it a bit further, by filling in certain child tables also.
Jim Newsom
IT Director, ICG Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform