First, let me point out that the terms "next" and "previous" can be
misleading in relational database. By definition, records in a relational
table are unordered, and you cause them to be ordered by specifying sort
fields in a query (which is the same as an ORDER BY clause in SQL).
That said, assuming that you are specifying an order during data entry that
will be the order you obtain by sorting on output, then it is relatively
easy, in VBA code, to define form-level variables into which you save the
values of the Form's Controls in the AfterUpdate event of the Form. You can
then put VBA code in the OnCurrent event of a new record to use those
variables both to set Controls in the new Record and as criteria in
conditional VBA statements such as IF ... THEN ....
Even if the records are not being entered in order, but you can identify
what the "previous" record should be (by a field value, such as an Order
Number, Customer Number, or a combination of field values), you can write
VBA code to read the previous record from the table, and obtain its values.
For a "semi-automatic" approach, you can simply use Ctrl plus the
single-quote, which will fill the Control with the value from the
previously-entered Record.
Larry Linson
Microsoft Access MVP
"Gene" <hr*****@yahoo.com> wrote in message
news:47**************************@posting.google.c om...
When entering a record in a form, I would like a value in a field of
the previous record to be entered automatically into a different field
of the current record. Which way should I go? Is it also possible to
do this based on criteria from the previous record?