View Full Version : How to update table in a particuler time interval


alap43841
10-08-2008, 02:46 AM
Dear Experts, I am creating a database to monitor stock price. One of my friends prepared a program by VB that extracts data from web and save in the access table every after 3 minutes. I am using that table as my data source of my database. I am facing a problem, that is the VB program saves the high and low value of the stock for the duration of that 3 minutes, but I want to get the hightest and lowest value during the trade hour. Like at 10:13 hours one stock was sold by 10$ and the highest price from 10:10 TO 10:13 was 13$, this is what I get from the table created by the VB Program. But at 10:06 to 10:09 the highest price of that stacock was 16$. So the highest price of the stock is 16$ upto 10:13 form the opening of the market. Is it possible to add another field with the table that will autmatically copy and store the highest price only. I am not an expert of VB or VBA, but I understand how to execute some instuction. It will highly helpful for me if you could attatch a small sample db with your solution. Please help me, I am trying to figure out the solution desperately but could not succeed, your cooperation will be highly appreciated.

neileg
10-08-2008, 06:16 AM
You don't need VBA, you can use a query. If you tell us the make up of your table (field names and types) and a sample of the data, someone will be able to advise you.

alap43841
10-08-2008, 10:10 PM
Thanks for your response, I also thought to get it by a query, but the problem is that, the table is refreshed with new data every after one minute and the old data is deleted, I could not figure out the solution, I am attaching the database that I am using as my data source. Please give me some idea. Thanks again

neileg
10-09-2008, 12:37 AM
If the old data is being deleted then whatever you do is going to have to happen every minute. This is unworkable. If you can get your freind to change the VB programme to append the data instead so that the history is retained, then you have a chance.