Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / April 2005

Tip: Looking for answers? Try searching our database.

Question on developing formulas

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dprocket - 11 Apr 2005 16:09 GMT
I am very new to databases and so this is likely a dumb question.  I have a
spreadsheet that I am trying to migrate to a DB.  The problem is that I don't
know how to re-create the calculation that I have in my spreadsheet.

It's pretty simple stuff, I have a "gross", "expense" and a "revenue'
column.  In my spreadsheet, I use a simple forumla to automatically populate
my "revenue" column (revenue = gross-expense).

I am setting up a web interface that will use the database as it's source.  
I'm hoping to have my sales reps enter thier sales data into a asp-page and
have the "revenue" column calculated automatically instead of them entering
it manually.  Does this make sense?  I suspect I will need to build a
function or a query of some sort, but am struggling to find answers.  thanks
in adavance for the help.
Ofer - 11 Apr 2005 16:41 GMT
You need to create a query that contain all the feilds +
the a revenue field that has the formula gross-expense.

"select *.MyTable, gross-expense as revenue from MyTable"

If I understood your question

>-----Original Message-----
>I am very new to databases and so this is likely a dumb question.  I have a
[quoted text clipped - 12 lines]
>in adavance for the help.
>.
John Vinson - 11 Apr 2005 17:51 GMT
>I am very new to databases and so this is likely a dumb question.  I have a
>spreadsheet that I am trying to migrate to a DB.  The problem is that I don't
[quoted text clipped - 10 lines]
>function or a query of some sort, but am struggling to find answers.  thanks
>in adavance for the help.

A Spreadsheet and a relational database ARE VERY DIFFERENT THINGS.

Though a Table may look like a spreadsheet, *it is not*. In
particular, you do not, cannot, and should not try to have formulas or
calculated fields in a table. That's not what tables are for!

Instead, just store "real" data - your gross and expense fields in
this case - in your Table; then use a Query to do the calculation, or
put a control on your ASP page which does the calculation. It is
neither necessary nor appropriate to store the calculated field in the
table, as it can be recalculated whenever necessary.

                 John W. Vinson[MVP]    
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.