In a Form
To obtain a value from a field in the previous record, type the following
line for the text box's ControlSource property:
=DLookUp("[MyField]","MyTable","[ID]=Forms![MyForm]![ID]-1")
To obtain a value from a field in the next record, type the following line
for the text box's ControlSource property:
=DLookUp("[MyField]","MyTable","[ID]=Forms![MyForm]![ID]+1")
In a Report
To obtain a value from a field in the previous record, type the following
line for the text box's ControlSource property:
=DLookUp("[MyField]","MyTable","[ID]=Reports![MyReport]![ID]-1")
To obtain a value from a field in the next record, type the following line
for the text box's ControlSource property:
=DLookUp("[MyField]","MyTable","[ID]=Reports![MyReport]![ID]+1")
In a Query
To obtain a value from a field in the previous record, type the following
line in the Field row of the query grid:
Expr1: DLookUp("[MyField]","MyTable","[ID]=" & [ID]-1)
To obtain a value from a field in the next record, type the following line
in the Field row of the query grid:
Expr1: DLookUp("[MyField]","MyTable","[ID]=" & [ID]+1)
clive jenkins said:
Thanks Rick B
PS do you know how to do this