ACC: Fill Record w/ Data from Prev. Record Automatically 1.x/2.0Last reviewed: May 8, 1997Article ID: Q88670 |
The information in this article applies to:
SUMMARYModerate: Requires basic macro, coding, and interoperability skills. When you are creating new records using a form, you may want to speed the data entry process by having fields in the new record fill automatically with values from the previous record. This article demonstrates a sample Access Basic function called AutoFillNewRecord() that enables you to automatically fill selected fields, or all fields, in a new record with values from the previous record.
MORE INFORMATIONOne technique to speed up repetitive data entry for the field containing the insertion point is to press CTRL+APOSTROPHE (') to retrieve the value from the previous record. Another technique is to use the AutoFillNewRecord()function described below. You can call this function from a form's OnCurrent property to fill all the fields in a new record using data from the previous record. If you want to fill only selected fields, you can create an unbound text box and set the DefaultValue property with a semicolon-delimited list of field names to automatically fill. For example:
Text box: Name: AutoFillNewRecordFields Visible: No DefaultValue: Phone;Company Name;City;State;ZipTo create and use the AutoFillNewRecord() function, follow these steps:
For information on how to do this in Microsoft Access 7.0 and 97, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q136127 TITLE : ACC: Fill Record w/Data from Prev. Record Automatically (95, 97) |
Additional query words: duplicate copy carry forward keep
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |