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

Grab value from previous rec & save into new field of current record

Status
Not open for further replies.
Apr 3, 2005
32
US
Basically, what I'm trying to do is grab one of the field value from previous record and save it into the same field for the current record.
I've tried the following code, but it is not letting me.
I'm really new at this.
Please help.

rstTemp As Recordset

DoCmd.GoToRecord , , acNewRec
Me.QuestionNum = 2
Me.Rate = Forms!frmSurvey2!frmQ2
Me.UserID = Environ("username")
Me.SurveyDate = Date
rstTemp.MovePrevious
PrevTestID = rstTemp.TestLogID
rstTemp.MoveNext
Me.TestLogID = PrevTestID






 
Why not simply this ?
PrevTestID = Me.TestLogID
DoCmd.GoToRecord , , acNewRec
Me.QuestionNum = 2
Me.Rate = Forms!frmSurvey2!frmQ2
Me.UserID = Environ("username")
Me.SurveyDate = Date
Me.TestLogID = PrevTestID

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top