473,385 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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
4 2274
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
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
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


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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jack | last post by:
Hi, I have a checkbox the value which goes to a database via a asp page that builds the sql string. In the front end asp page, the checkbox code is written as follows: <i><input...
0
by: Henry | last post by:
Hi Is there any good ideas how to update form vb code always after some values are changed / added by vb (not user). I have some code behind subforms vb and there are calculations behind...
3
by: ahaque38 | last post by:
Hello. Using A2K SP3, I am having the following problem with a report using "Sorting and Grouping". I have recently added a grouping in the reports for "Category2<>'CONTRACTS'". I have...
0
by: wonmee | last post by:
How do I calculated a number and store it in a table? Thanks
3
by: markaelkins | last post by:
I want to create a simple user interface to collect the following data and store the data in a SQL database…. Could someone please help me get started? Data to collect from user interface and...
2
by: MLH | last post by:
Fields in MyTable: PostID PostDate RollQtyXfer RollDenomination RollCount37 RollCount23
3
by: kelley.l.turner | last post by:
Hi all, I am very new to MS Access so please bear with me! I have created a simple calculated field in my data entry form, yet when I view my data table or try to generate a report based on...
5
by: vsteshenko | last post by:
Hello, This is my second post to the any usernet group and the first one was posted to the wrong one. I am currently working on creating an order form for sales associates at my work to be used...
1
by: Rajeesh123 | last post by:
I have a dom tree in asp with jscript(same kind of treeview in .net). when user clicks on it , I pass the id to a hidden field and update it with ajax. The main page has one if clause to get the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.