473,322 Members | 1,501 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,322 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 2269
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.