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!

Copy field B in record 1 to field A in record 2

Status
Not open for further replies.

goatfarmer

Technical User
Jul 12, 2002
2
0
0
US
My database carries distance intervals in a FROM - TO format. I want my form to automatically transfer the TO of the last record, to the FROM of my next record.
 
1. In form's declarations area, create a private variable:
Private mSaveValue As Integer

2. Put the following code in the form's After Update event:
mSaveValue = ToControlName.Value

3. Put the following code in the form's On Current event:
FromControlName.Value = mSaveValue

The .Value for the control names are optional, just helps to make your code a little more self documenting.

Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top