Display last on record on current record

megamef

Registered User.
Local time
Today, 22:01
Joined
Apr 18, 2013
Messages
161
Hi All,

I'm trying to make a form that shows what the last record was next to the empty space where you enter a new record.

This is so the user knows that what they are entering is roughly in line with what has come before.

So for example if I was recording temperature every May, I would like a form that has a field called temperature and next to that field I would like to see last year's temperature.

Records:

Date ¦ Temp
2014 ¦ 20.5
2013 ¦ 18.5
2012 ¦ 19.0
2011 ¦ 22.7
2010 ¦ 15.2

So when I enter the record for 2015 I have a box that says: Temp and next to that box is "Last year was 20.5" or something like that.

Any ideas anyone?
 
Thanks plog, you lead me down the right path. I'm posting the code i came up with here if anyone want it for future reference:

Code:
maxdate = DMax("TestDate", "tblcal")
lastcal = DLookup("CalPoint1", "tblCal", "testdate=#" & Format(maxdate, "mm/dd/yyyy") & "#")
Me.LastCalText.SetFocus
Me.LastCalText.Text = lastcal
 

Users who are viewing this thread

Back
Top Bottom