gorillaboze
05-16-2002, 08:20 AM
I am working on a query that keeps track of securities that are bought and sold. I am using the follwing fields: TradeDate, TodaysDate, PurchasePrice, CurrentPrice. I need to find the following for PriorPrice:
IIf([TodaysDate]=[TradeDate]+1,[PurchasePrice],[PriorPrice)
The securities price daily, but if we purchased the security on the previous day, it needs to price using the purchase price, not the previous day's price. I need to exclude holidays and weekends though. So if TradeDate is a Friday, the previous price will pull in Purchase Price instead of Prior Price.
If anyone can help it would be greatly appreciated.
IIf([TodaysDate]=[TradeDate]+1,[PurchasePrice],[PriorPrice)
The securities price daily, but if we purchased the security on the previous day, it needs to price using the purchase price, not the previous day's price. I need to exclude holidays and weekends though. So if TradeDate is a Friday, the previous price will pull in Purchase Price instead of Prior Price.
If anyone can help it would be greatly appreciated.