accessuser343
New member
- Local time
- Today, 08:17
- Joined
- Dec 26, 2011
- Messages
- 2
Hi, here is what I am trying to do:
Using Access 2000, 2007 and 2010, I am trying to calculate the datediff, "n" between two different fields in two consecutive rows and put the value in a separate field in the first row using a vba function or module in Access.
Here is pseudo code:
If ([table1].[(row+1) field2]) = ([table1].[this row field2])
Then [This row Field5]=Datediff("n",[this row field 4],[next row field 3])
basically Format((Datediff("n",[Start time],[StopTimeNextRow])), "h:nn")
But how do I read in the next row using vb code?
What would the function or module be coded from start to finish?
Thank you in advance for any help...
Using Access 2000, 2007 and 2010, I am trying to calculate the datediff, "n" between two different fields in two consecutive rows and put the value in a separate field in the first row using a vba function or module in Access.
Here is pseudo code:
If ([table1].[(row+1) field2]) = ([table1].[this row field2])
Then [This row Field5]=Datediff("n",[this row field 4],[next row field 3])
basically Format((Datediff("n",[Start time],[StopTimeNextRow])), "h:nn")
But how do I read in the next row using vb code?
What would the function or module be coded from start to finish?
Thank you in advance for any help...