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

How to repeat last entry in Access

Status
Not open for further replies.

radioman000

Technical User
Dec 19, 2003
10
0
0
US
Hi all..
I have an Access database use for service workorders which contains fields for customer name, contact, phone, make, model etc. Many times we get several items from one customer and I would like to make the customer name, contact and phone fields "repeat" when adding the next "new" record. Would like for this to be a button that one could choose to repeat or not..depending on the need. Can anyone help wiht this?

Thanks

Radioman000
 
To duplicate the record try this code in the On Click of the Command Button:

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70

Hope this helps.
 
Another way is to play with the DefaultValue property of the controls you want to repeat, setting it to the actual value of the control.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
This is not exactly what you want, but you may find it useful:
In Datasheet View (e.g. in a subform), a user can set the contents of a field equal to the contents of the same field in the previous record, by inputting Ctrl+"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top