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

How to enter a value in a field to be calculated and stored

P: n/a
I want to enter a value in a field and for that value that was entered
to be multiplyed by 10 and then stored in a table. How do I do this?

For example:

[testCalc]=[testCalc]*10;

Thanks,
Won Mee
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Use an event to trigger the update, either a button click, or the after
update event of the field, then use a recordset to add the data to the
table.

Something like.....

Private sub Yourfield_AfterUpdate()

dim db as database
dim rs as recordset
set db=current.Db
set rs=db.OpenRecordset("yourtablename",dbOpenDynaset)

with rs
..addnew
!TableField = Your field * 10
..update
end with
set rs=nothing
set db=nothing

end sub

Probably easier ways too.

Gerry Abbott

"Won Mee" <wo****@comcast.net> wrote in message
news:4e**************************@posting.google.c om...
I want to enter a value in a field and for that value that was entered
to be multiplyed by 10 and then stored in a table. How do I do this?

For example:

[testCalc]=[testCalc]*10;

Thanks,
Won Mee

Nov 13 '05 #2

P: n/a
On 1 Dec 2004 08:33:15 -0800, Won Mee wrote:
I want to enter a value in a field and for that value that was entered
to be multiplyed by 10 and then stored in a table. How do I do this?

For example:

[testCalc]=[testCalc]*10;

Thanks,
Won Mee


Why would you wish to save it?
Save the underlying value.
Once you have the [testcalc] value stored in your table, any time you
need the [testCalc]*10 calculated, simply calculate it.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #3

P: n/a
On Wed, 01 Dec 2004 18:43:48 GMT, fredg wrote:
On 1 Dec 2004 08:33:15 -0800, Won Mee wrote:
I want to enter a value in a field and for that value that was entered
to be multiplyed by 10 and then stored in a table. How do I do this?

For example:

[testCalc]=[testCalc]*10;

Thanks,
Won Mee


Why would you wish to save it?
Save the underlying value.
Once you have the [testcalc] value stored in your table, any time you
need the [testCalc]*10 calculated, simply calculate it.


I meant to write:

Once you have the [testcalc] value stored in your table, any time you
need the [testCalc]*10 calculated, simply calculate it, in a form,
query, or report.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #4

P: n/a


Fred,
HOw do I store a calculated field into a table by a query?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.