calculation
Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=17093
Printed Date: 29 March 2026 at 5:07pm Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: calculation
Posted By: urko
Subject: calculation
Date Posted: 31 October 2005 at 12:28pm
Hi,
I have small problem which I can't solve.
In my db ( access ) I have cells:
Velocity
bullet_weight
Energy
Once a users fill the form on page:
Example:
Velocity: 2000
Bullet_weight: 4
and submit it, it goes to a new page where data is displayed:
Example:
velocity: 2000
Bullet Wiegth: 4
Now, in this page an extra cell is displayed:
Energy: 35,536
This cell (Energy) should show result when calcualting following:
=[Velocity]*[Velocity]*[bullet_weight]/450240 |
Now I don't know how and where I should add this calculation in access so that in page the energy would show:
Energy: 35,536
Which would be the result from other cells!
Hope u understand what I mean by that
Thanks,
PS.
Can also some1 tell me how can I do, so that once this is submitted I
would be informed by email, as I have to activate a record before shows
on page!
------------- Urko
|
Replies:
Posted By: dj air
Date Posted: 31 October 2005 at 1:15pm
right let me clarify
you have 3 values
you have 2 and want to calculate the 3rd
when the foms submitted why not add the form values into verinles then
run the calculation and submit the answer along with the other details
verible1 = formelement1
verible2 = formelement2
energy = (verible1 * verible1 * verible2) / 450240
then submit verible1, verible 2 and energy into the daabase or email depending how its done
im not 1000% i got your question right
|
Posted By: urko
Date Posted: 31 October 2005 at 1:22pm
Thanks dj air,
I have found one website where they are explaining how to do that:),
and it is really simple...oh..how I didn't figure it out before.
All I had to do is wite the calculation code in query in field name
energy:[Velocity]*[Velocity]*[bullet_weight]/450240

So is it possible to get the email when some1 insert record and how?
Thanks,
------------- Urko
|
Posted By: dj air
Date Posted: 31 October 2005 at 1:26pm
you have that part of the asp page, after the insert use the verible
values and generate an email and send using a asp email script/ emailer
it would be better to work out the energy value before submitting to the daabase, setting the energy value wthin a verible
you can then use all veribles within the email also
check out the email form on this website in the tutorials/free scripts section
|
Posted By: urko
Date Posted: 02 November 2005 at 7:42am
i tried free script and works great...thanks :)
Can you also advise me or give me some hints how to do following:
db that I have has main table called tblWebsites( search enigne from
WebWiz) which I changed not to be a search engine but to show items and
on click goes to detail page where items are fully displayed.
Now table TblWebsites are in relationship with table called Submit_Load (the one from my first post) where users can add their info about certain item.
The problem which i have is:
Submit Load table has beside velocity, bullet_weigh, energy another 10 cells which users have to fill in order to add something.
Now when users submit info it will go to correct id in db, but the
fileds energy, and Title will stay empty in table Submit_load. Now I
know that cell Title as it is in tblWebistes should not have to be in
Submit_load but energy should be displayed.
But from my first post as you know users can't see the energy field as it make a calculation based on other entries.
Therefor I have made a query and selected cells from tblWebistes and submit_ loads to show info on my page.
I use query to display reviews and in query energy filed is calculated
[Velocity]*[Velocity]*[bullet_weight]/450240.
The main problem I have is in admin. My admin pages ( I have found free
asp admin script ), does not allow to edit or delete query.
If this would be allowed I would be OK without problem .
So when I try to edit table Submit_load, cells title and energy field are empty.
Is it possible to somehow connect query and Submit_load table so that
cells title and energy in Submit_load would not be empty???
Again sorry for my english.. I hope u know what I mean..otherwise I'll try to explain it again...hopefully more accurate .
If you want I can send u PM with link to download db and link to my website to see.
Thanks,
------------- Urko
|
|