Updating fields in subform with previous data (1 Viewer)

Sturmtruppe

Registered User.
Local time
Today, 23:49
Joined
Mar 26, 2009
Messages
18
I want my date & time fields in my subform to automatically input values after i click a check box on my main form.

The values i want it to input would be the data from the date & time fields in the previous record. Is there an AfterUpdate event i can use on the "Called Back?" check box that would update "Interview Time" & "Interview Date" with previous info?

Thanks

Darren

**EDIT**

I found a way to get the default value to show the previous records, the one for interview time:

=DLookUp("[Interview Time]","IAG_Interview_Date","[Int Number] = " & DMax("[Int Number]","IAG_Interview_Date"))

but for this, is there any way to let it add 30 minutes each time, so the 'interview time' = the previous interview time + 30 minutes. I'm guessing this is too basic to allow me to do that.
 
Last edited:

boblarson

Smeghead
Local time
Today, 16:49
Joined
Jan 12, 2001
Messages
32,059
This should do it for you:
Code:
=DLookUp("[Interview Time]","IAG_Interview_Date","[Int Number] = " & DateAdd("n",30, DMax("[Int Number]","IAG_Interview_Date")))
 

Sturmtruppe

Registered User.
Local time
Today, 23:49
Joined
Mar 26, 2009
Messages
18
Hi,
i replaced the dlookup but seems to bring up '#error'. Perhaps i should mentioned that it is a date/time field with an input mask 00:00 & validation rule to allow only times between 09:30 & 15:00.

ps also usingd access 2003
 

Users who are viewing this thread

Top Bottom