Unanswered: VBA with a Query row by row evaluation, like you can with a report, possible?
I'm trying to work on printing off some time reports from a security system. There's an events table where someone is either coming in or going out. I have setup a report with some vba code under the
Private Sub Detail_Print which evaluates if the person is coming or going and then does a timeDiffSec = DateDiff("s", gateInTime, gateOutTime) to find out the difference and adds it to a counter.
The problem is it's seeming to get more and more complicated and I can get some of the right data but it's not printing out nicely.
So my idea was well maybe I should do the datediff as a new query and just store that value then it'd be pretty easy to run the query. But using a small sample data of 27 events 14 comings 13 goings when I try to make a query I get 31 values returned.
So is there anywhere to attach vba code to a query or am I attacking this wrong.