Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automated Data Entry

Status
Not open for further replies.

bigandfat

Technical User
Feb 7, 2002
42
CA
A user has asked my why repeditive data has to be re-entered or copy and pasted into a field. She suggested something like pressing the spacebar ( as when entering the current timestamp ) to copy the previous record's data into the current record's same field would be fo great benifit when entering reams of data.
There are probably may ways to do this, however I thought I would ask if anyone has tackled this type of problem before.

the fields would be:
Timestamp, Grade Code,data,data,data etc.
The grade code field would be the same for many data entries in a row.

Thanks in Advance
 
Yeah, I do a couple of different things. CTL-D is the built-in Ditto key combo which grabs the data from the record above the current record in the table and sticks it in the current record. The problem is that if you are experiencing flyaway then the previous record may not be the one that ends up right above the current record.

Alternatively you can add a DITTO button, which grabs the data from the fields you want to duplicate and plugs it into variables. Then IT adds a new record (assigning any unique ID numbers in the process) and populates the fields with the data from the variables, then moves the cursor to first field that needs user attention. I have one application that uses two of these buttons on the form for different circumstances.

Here is some very (very) simple sample button code that might better explain:

Code:
var

 oldName   string
 oldAddy   string
 oldDate   date
 
endvar

;get the current values
oldName = name.value
oldAddy = address.value
oldDate = Start_Date.value

;get a new blank record
myMRO.insertRecord()

;repopulate the new record with old values
name.value = oldName
address.value = oldAddy
Start_Date.value = oldDate

;get an index number
myIndxeField.value = getAnIndexNumber()

;put the user at the blank that needs attention next
moveto(end_date)

obviously you would put in some error checking and such, but you should get the idea.



Mac :)

"There are only 10 kinds of people in this world... those who understand binary and those who don't"

langley_mckelvy@cd4.co.harris.tx.us
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top