Autofillling Fields from previous record

joe90

Registered User.
Local time
Today, 23:47
Joined
Apr 15, 2008
Messages
23
Hi,

I am trying to establish how to overcome this problem.

I have 4 fields in my Table:

DT (Date/Time)
Machine1StartFigure
Machine1EndFigure
Shift

I am trying to use the data last entered into 'Machine1EndFigure' as a new value in the next records 'Machine1StartFigure'.
So that when a shift go to enter their figures at the end of the shift it will pull up the last shifts end figures and make them the start figures for this new record. This is so that then I can calculate in the form exactly what that shift has done, and so that the current shift will not have to input the last shifts counts. Hope this makes sense.

I am not sure if it would be best to try and somehow do this in a query or to have some code in the form itself.

I would greatly appreciate any help or advice anyone couuld give me.

Thankyou in advance

Joe
 
Hi

I had a similar issue some weeks ago and i was told to try:

Private Sub Form_AfterUpdate()
Machine1Endfigure.DefaultValue = """" & Me.Machine1Startfigure & """"
End Sub

Worked for me, not sure if its exactly what your after but no harm done if not.

Regards
 

Users who are viewing this thread

Back
Top Bottom