Good Days Folks... hope you'll are good
Giving this equation and loop another try can this been down... did this with on date_Field but what if i want to know the difference step down cross fields and rows consecutively ...lol does that statement make sense lol
ID |
Names |
StartDate |
EndDate |
DaysReturned |
1 |
JOHN DOE |
14-Jan-19 |
21-Jun-19 |
|
1 |
JOHN DOE
|
06-Jul-20 |
11-Mar-20 |
|
2 |
JOE SUE |
01-Apr-29 |
12-May-29 |
|
2 |
JOE SUE |
15-Sep-20 |
15-Nov-20 |
|
2 |
JOE SUE |
02-Nov-20 |
14-Dec-20 |
|
2 |
JOE SUE |
21-Dec-20 |
12-Jan-21 |
|
|
|
|
|
1 |
(D2)ED- (C3)SD |
|
|
|
2 |
(D4)ED- (C5)SD |
|
|
|
2 |
(D6)ED- (C7)SD |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Heys guys tried to give table as excel_spread... sorry only way i knew how
Code:
Function tblReturnedDays() Dim db As Database, rst As Recordset
Dim PrevID As Long
Dim PrevDate As Date, StartDate As Date
Set db = CurrentDb
Set rst = db.OpenRecordset("tblReturnedDays")
rst.MoveFirst
Do
PrevID = rst!ID
PrevDate = rst!EntryDate - StartDate
rst.MoveNext
If rst.EOF Then
Exit Do
End If
If rst!ID = PrevID Then
rst.Edit
rst!DaysReturned = rst!EntryDate - StartDate
rst.Update
End If
Loop
rst.Close
Set rst = Nothing
Set db = Nothing
Is this Possible as is... usually i use excel datediff between cells to get an answer Hmmmm and so far much easier but am still trying to figure this out in Ms Access