By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,985 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,985 IT Pros & Developers. It's quick & easy.

Automatic data changes in a form need to save to table

P: 3
Running data Append to a table


Dear All,

I need a help from this forum, I was developing a small tools for stock market.
I get stuck when trying to save the running changes in a data field value from a form to a table.

Here I have two table and one form
1. LiveData - (Connected to external file which reflect the changes automaticaly)
Ex: StockCode OfferQty
1020 1000 (This qty will change automatically from the ext link No problem)

2.DataSave

In this table I would like to save all changes happening to the Livedata table
So whenever OfferQty in LiveData table change it should be append to my DataSave Table.

3. Form is linked to LiveData table, whenever data change in a form it required to save to the second table

Note: All data change is automaticaly from the stock market data

Please suggest a solutions to the same,

Appreciate your help

Thanks regards
Subhash
May 12 '07 #1
Share this Question
Share on Google+
6 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
Running data Append to a table
--------------------------------------------------------------------------------

Dear All,

I need a help from this forum, I was developing a small tools for stock market.
I get stuck when trying to save the running changes in a data field value from a form to a table.

Here I have two table and one form
1. LiveData - (Connected to external file which reflect the changes automaticaly)
Ex: StockCode OfferQty
1020 1000 (This qty will change automatically from the ext link No problem)

2.DataSave

In this table I would like to save all changes happening to the Livedata table
So whenever OfferQty in LiveData table change it should be append to my DataSave Table.

3. Form is linked to LiveData table, whenever data change in a form it required to save to the second table

Note: All data change is automaticaly from the stock market data

Please suggest a solutions to the same,

Appreciate your help

Thanks regards
Subhash
The simple answer Subhash is you don't store calculated values in the table. The reason being that data integrity is too diffucult to maintain.

Calculated values should be calculated as required and not stored.
May 12 '07 #2

P: 3
The simple answer Subhash is you don't store calculated values in the table. The reason being that data integrity is too diffucult to maintain.

Calculated values should be calculated as required and not stored.

Dear MMCCARTHY,

Thanks for your consideration and reply

Sir may be you did not understand my question, For example

I have a form contain a field (time) for realtime clock,
assume that this clock time is changing automatically in the form by everysecond (I use timer to change the field value)

I will keep open the form and time is changing
I want to save changing time field to a table (automatically) without any action/button click. Is this possible.

I tried to use on dirty but no effect, i dont know the effect of on change and on data change..

Any event can help to save this changes in a form to a table automatically.

I hope you now clear my question.

Please help

Regards
Subhash
May 13 '07 #3

ADezii
Expert 5K+
P: 8,619
Dear MMCCARTHY,

Thanks for your consideration and reply

Sir may be you did not understand my question, For example

I have a form contain a field (time) for realtime clock,
assume that this clock time is changing automatically in the form by everysecond (I use timer to change the field value)

I will keep open the form and time is changing
I want to save changing time field to a table (automatically) without any action/button click. Is this possible.

I tried to use on dirty but no effect, i dont know the effect of on change and on data change..

Any event can help to save this changes in a form to a table automatically.

I hope you now clear my question.

Please help

Regards
Subhash
If you want to periodically Save Form data to a Table without user intervention, you can accomplish this via the Form's Timer Event. I must admit that I am a little hazy trying to figure out what you are attempting to do.
May 13 '07 #4

MMcCarthy
Expert Mod 10K+
P: 14,534
Dear MMCCARTHY,

Thanks for your consideration and reply

Sir may be you did not understand my question, For example

I have a form contain a field (time) for realtime clock,
assume that this clock time is changing automatically in the form by everysecond (I use timer to change the field value)

I will keep open the form and time is changing
I want to save changing time field to a table (automatically) without any action/button click. Is this possible.

I tried to use on dirty but no effect, i dont know the effect of on change and on data change..

Any event can help to save this changes in a form to a table automatically.

I hope you now clear my question.

Please help

Regards
Subhash
How and where have you code the timer. What is the control source of you textbox set to.
May 13 '07 #5

tdw
100+
P: 206
tdw
How and where have you code the timer. What is the control source of you textbox set to.
Not that I have a solution for you, but I it appears to me that what you need may not be understood very well, so I figure I'll step in here and ask you if I am understanding it right, and then someone may come up with a solution for you (I came across this because I am also trying to store a calculated value to a table, and while I understand that most of the time you don't need to do this, there are times where it is needed).

It sounds like you are trying to monitor changes in the stock market on a real-time basis, and want every change tracked. You want each change permanently stored because once it changes again, there will be no way to compare a current value to a previous value unless it gets saved to your table each and every time, in a new record each time. But the value you want to store is being calculated from other factors, including stuff that is coming from outside the database itself. For example if calculated value x is really high one day, then really low the next, you need to be able to see it and say "wow, it really fell!" Then the next day it's high again (I'm just picturing the stock market here) and you can say, "hey, this is close to what it was two days ago!"

Am I close?
May 19 '07 #6

MMcCarthy
Expert Mod 10K+
P: 14,534
These kind of processes require the creation of a transaction table. This is a table set up to record historical data of changes to a value.

For shares you would have something like the following:

tblShare
ShareID (Autonumber, Primary Key)
ShareName

tblSharePrice
SharePriceID (Autonumber, Primary Key)
ShareID (Foreign key reference to tblShare primary key)
Date (Date on which price is recorded)
Price (Price of share)

At any time using this structure you can check the current price or the price at any date recorded in the past. You can also check the price difference between any two dates.

This may have to be adapted or expanded somewhat but when this is the kind of structure you should be looking at.

Mary
May 19 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.