Create a repeat entry key for data on previous record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using Access 97. A former employee set up a repeat entry key (smiley face) on
the toolbar to enter the same data as on previous record. How do I create
this?
 
Well, here's one way. Create a function in a General Module like this:

Public Function DuplicateRecord()
On Error GoTo Err_duplicateRecord
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
Exit_duplicateRecord:
Exit Function
Err_duplicateRecord:
MsgBox Err.Description
Resume Exit_duplicateRecord
End Function

Then create a Macro with RunCode in the Action and DuplicateRecord() as the
Function

Now, right-click on the toolbar you want the button on and choose Customize.
In the Categories box, choose All Macros. Then in the Commands box, choose
the macro you just created and drag it to the toolbar. Before closing the
Customize box, right-click on the new button and choose Change Button Image
in the dropdown box and change the button image to a smiley face.


--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
Vickie said:
Using Access 97. A former employee set up a repeat entry key (smiley
face) on the toolbar to enter the same data as on previous record.
How do I create this?

You can use the Control (quote) key combo to do it. You could set up a
button control and put a picture of a smiley face on it and set the
on-click property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top