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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copying the previous record into a new record with a hot key

Status
Not open for further replies.

lminmei

Programmer
Feb 1, 2000
111
US
I want to create a hot-key macro (ex: ctrl + m) that copies the previous record of the field that the cursor is in <br>
<br>
For instance, say that i have entered a record with fields for [Name] and [Occupation]. I then go to a new record and want to input the same information in the same fields. so when my cursor is in the [Name] field, I want to be able to just hit a hotkey and the previous record of that field is copied into the new record's field.<br>
How would i go about coding this?
 
Or you can use Window's Ctl-C (copy) then Ctl-V (paste).<br>
Or you can use the wizard to create a &quot;Copy&quot; button:<br>
1. Put the form in design view.<br>
2. Click on the button tool in the toolbox.<br>
3. Let it guide you to create a Copy button (Record Operations/Copy)<br>
4. When the button is complete, go into the OnClick Event & view the VBA code.<br>
This is a great way to learn how to code common VBA functions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top