castillo@media-lab.MEDIA.MIT.EDU (Brian Anderson) (09/11/90)
I've just upgraded to dBASE IV 1.1 and I was wondering if anyone had any thoughts about how to solve the following problem: I have a database which is 80-90% hand entered, therefore I've done as much as possible to automate the process and save keystrokes. One of those functions is a replication key which will copy over certain fields from the current record to a new record, i.e. 1) display a record 2) press the replicate key; append a blank record, replace several (not all) blank fields with previous record values, go into edit mode with this new record The values of the previous record fields are maintained in a series of memory variables which are updated each time a new record is displayed. What I'd like to do is append a blank record and go directly into edit mode, then have a function key fill in an individual field with the previous record contents, i.e. 1) display a record 2) press the add key ("add a new record") append a blank record go into edit mode upon pressing "F2" replace the current field with the appropriate memory variable contents This would allow the victim doing all the data entry to selectively copy data over from the previously entered record. The requirements as to which fields should be copied vary enough from record to record that I can't really code it into a series of specific function keys, i.e. F2 - append a blank a copy over fields 1, 2, 3 and 7 F3 - append a blank a copy over fields 1, 2, 4, 5, and 9 etc. Is there any way to make use of the @ GET...VALID clause, or some other scheme to create such a field specific data replication key? It's not obvious to me just how to go about this, but in dBASE hardly anything ever is. thanks in advance, Brian -- "make lots of money", "enjoy the work", "operate within the law": pick any 2 ----------------------------------------------------------------------------- Brian Anderson | "It's hard to work in groups when you're castillo@media-lab.media.mit.edu | omnipotent." - Q, ST-thg "Deja-Q"
keithm@ashtate (Keith Mund) (09/12/90)
In article <3337@media-lab.MEDIA.MIT.EDU> castillo@media-lab.MEDIA.MIT.EDU (Brian Anderson) writes: >I've just upgraded to dBASE IV 1.1 and I was wondering if anyone had any > [ text deleted on how to do this with programming ] >The values of the previous record fields are maintained in a series of >memory variables which are updated each time a new record is displayed. >What I'd like to do is append a blank record and go directly into edit >mode, then have a function key fill in an individual field with the >previous record contents, i.e. > > 1) display a record > 2) press the add key ("add a new record") > append a blank record > go into edit mode > upon pressing "F2" replace the current field with the appropriate > memory variable contents When appending records, data from the last record appended can be copied to the new record by pressing Shift-F8. This sounds pretty much like what you want. Attaching groups of fields to a function key for replacement could be performed by creating a keystroke macro without any programming. Just start recording, a macro key of your choice, move to the proper fields and use the Shift-F8 function to copy data for each. The next time you invoke the macro key, selected data will be copied. >It's not >obvious to me just how to go about this, but in dBASE hardly anything >ever is. The Shift-F8 keystroke, something I did not know existed until now, was described by pressing F1 for help while editing data. Hope this has been some help. Keith Mund