Fill form enteries based on previous record

RossW

Registered User.
Local time
Today, 23:08
Joined
Oct 17, 2000
Messages
10
I have created a data entry form. In some instances, I want the value from the previous record (i.e. date, supplier name)to be automatically entered into the same field for the current record. Is there a way to do this other than using the [CTRL] + ' key sequence?
 
you can use a dlookup. it's in the help files. also, i think you can use autolookup. it is also in the help for access.

[This message has been edited by yeatmanj (edited 10-20-2000).]
 
I use this on the OnExit Even of the last text control for my form. But you could set it to any event you like. This puts the last enterd value for your text boxes in the new rocords text boxes.

Private Sub txtPW_Exit(cancel As Integer)

With CodeContextObject

.JobNumber.DefaultValue = """" & .JobNumber & """"
.JobName.DefaultValue = """" & .JobName & """"
.WeekEnding.DefaultValue = """" & .WeekEnding & """"

End With

DoCmd.GoToControl "JobNumber"
DoCmd.GoToRecord acForm, "TimeSheetGR", acNewRec
End Sub


[This message has been edited by Talismanic (edited 10-20-2000).]
 

Users who are viewing this thread

Back
Top Bottom