Question Locked

Access query

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a query with client name, their open date and closed date. I want to create a field that calculate the date difference between the current open date and the previous closed date. for example:
clientName Opendate closeddate diffe
a1 1/1/07 12/1/07
a1 2/1/08 60
if the client came in for the first time the field stay blank.
Thanks in advance.

2 replies

by john.a.wills

What you need first is to calculate the difference on the form where the new visit is getting recorded. select max(opendate) grouping by client with this id or name and use the closedate from the row. Something like that.

This discussion is closed to new replies.