×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

SUBTRACT PREVIOUS DATE FIELD FROM CURRENT DATE FIELD

SUBTRACT PREVIOUS DATE FIELD FROM CURRENT DATE FIELD

SUBTRACT PREVIOUS DATE FIELD FROM CURRENT DATE FIELD

(OP)
Good Afternoon Everyone,

I'm using a query with a lot of calculated fields. The stumper for me is how to calculate a date difference between the current record date and the previous record date within the same record set.

query name: qryProjectionEventsAll
record set: PROJID (Linked to Main Event)
field name: d (date value)

Any help is greatly appreciate.
Kim

RE: SUBTRACT PREVIOUS DATE FIELD FROM CURRENT DATE FIELD

Some small sample of your data would go a long way. And the sample of expected result based on it as well. Like - what you want in the first record which does not have "previous record date", right?


---- Andy

There is a great need for a sarcasm font.

RE: SUBTRACT PREVIOUS DATE FIELD FROM CURRENT DATE FIELD

(OP)
Two main tables used:
tblProjectMain - automatic sys id number (PROJID), this data is the same for each crime series (one project)
tblProjectEvent - there are multiple events in each Project Series (linked to main project by sys id PROJID)

Each Project may have many events in the series (record set). The Date (field "d" in the query) contains an average date value of [ls] & [af]. What I'm trying to accomplish is show the first record in each record set as null, then subtract the 2nd date value from the 1st, then subtract the 3rd date value from the 2nd, etc.. through the entire record set, then start over with a new record set.

This one step is so confusing to me. I've figured out all other fields except this one.

Any help is appreciated. Please see the screen shot of my form. The main form and subform are both run via different queries (qryProjectMain) & (qryProjectEvents)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close