I need to calculate the difference in a stock price from one (user defined) day to another. Being new to access my issue is how to do this given that the records with the beginning and end dates are different and the data is not in the same row. e.g.
Key # Stock Date Price
1 IBM 1/2/15 95
2 IBM 1/3/15 100
3 IBM 1/4/15 101
4 IBM 1/5/15 102
If the user selects the run dates from 1/3/15 to 1/4/15 the math for a price change would be 101/100. How can I do this calc without the data being in the same row? I can do a union query and create the data all on one row but I'd think there is a more efficient way to do this through a formula in a module.
Thanks
Key # Stock Date Price
1 IBM 1/2/15 95
2 IBM 1/3/15 100
3 IBM 1/4/15 101
4 IBM 1/5/15 102
If the user selects the run dates from 1/3/15 to 1/4/15 the math for a price change would be 101/100. How can I do this calc without the data being in the same row? I can do a union query and create the data all on one row but I'd think there is a more efficient way to do this through a formula in a module.
Thanks