pdvsa
asked on
Date and IF statement
Experts,
I need a formula that will return the [tblLetterOfCredit.Expirey Date] for the first record but then for all else then return the [tblPayments.PaymentDate].
Where clause is tblLetterOfCredit.LCID = tblPayments.LCID and I think the formula would need to reference [tblPayments.ID] somehow.
It would be better to see the attached pared down db.
There are 2 tables and 1 query only.
Here is a screenshot of what I am looking for:
EE_Date.accdb
I need a formula that will return the [tblLetterOfCredit.Expirey
Where clause is tblLetterOfCredit.LCID = tblPayments.LCID and I think the formula would need to reference [tblPayments.ID] somehow.
It would be better to see the attached pared down db.
There are 2 tables and 1 query only.
Here is a screenshot of what I am looking for:
EE_Date.accdb
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Oh and to answer your question, I would rather have the data in a query. I could have in a report but sometimes it doesnt export to excel so I thought to have as raw data.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Jim, I see that it does work perfectly in the sample db however, when I transferred it over to the production db I had the issue. I made no changes. Very strange. I imagine I made a mistake somewhere.
Gustav: that worked. Thank you!
Mate: thank you for that crafty tip. It seems pretty simple and I understand it 100% and can eliminate any subquery, which is good in my case ;) I didnt test it however and I feel confident results are what I need.
Gustav: that worked. Thank you!
Mate: thank you for that crafty tip. It seems pretty simple and I understand it 100% and can eliminate any subquery, which is good in my case ;) I didnt test it however and I feel confident results are what I need.
ASKER
Mate, FYI: I did test it and worked perfectly like the others. I appreciate your response. I actually applied your logic successfully to another completely separate issue. Thanks for the help!
ASKER
Let me know if i have missed something. Thank you once again.