473,387 Members | 1,290 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,387 software developers and data experts.

Calculated Field?

Hi
Would like to add a new Field to Table which is 75 % (or another
Percentage) higher than the Value in another Field in same Table.Is
this possible with Expression or would I have to enter the Values
manuallyTried to build a Query like this (successful) and then link
the new Field to the Query but was only able to do this as a Combo BOx
and not text field.
This is for a Products Page where I want to base the Retail Price on
the Cost Price
Any Help appreciated
Regards
Manfred
Nov 12 '05 #1
2 2308
Access / Jet (and, indeed, good relational design practices) do not support
calculated fields in tables. You should calculate the value in a query or in
a control on a form or report when the value is needed.

Larry Linson
Microsoft Access MVP

"Manfred" <ad***@cbdafrica.com> wrote in message
news:45**************************@posting.google.c om...
Hi
Would like to add a new Field to Table which is 75 % (or another
Percentage) higher than the Value in another Field in same Table.Is
this possible with Expression or would I have to enter the Values
manuallyTried to build a Query like this (successful) and then link
the new Field to the Query but was only able to do this as a Combo BOx
and not text field.
This is for a Products Page where I want to base the Retail Price on
the Cost Price
Any Help appreciated
Regards
Manfred

Nov 12 '05 #2
If this field should always be 75% of the other (and it would be wrong for
it to be anything else), then Larry is right. You need a calculated field in
a query instead of a field in your table. More information in article:
Calculated fields
at:
http://allenbrowne.com/casu-14.html

If you want to start with 75% of the value and then be able to set different
values for different items, you do need the field in your table. Add the
currency field, and you can automatically populate it with an Update query:
1. Add the new field to your table.

2. Create a query into this table.

3. Change it to an Update query (Update on Query menu).
Access adds an Update row to the query grid.

4. Drag the new field into the query grid.

5. In the Update row under this field, enter:
1.75 * [Cost Price]

6. Run the query.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Manfred" <ad***@cbdafrica.com> wrote in message
news:45**************************@posting.google.c om...

Would like to add a new Field to Table which is 75 % (or another
Percentage) higher than the Value in another Field in same Table.Is
this possible with Expression or would I have to enter the Values
manuallyTried to build a Query like this (successful) and then link
the new Field to the Query but was only able to do this as a Combo BOx
and not text field.
This is for a Products Page where I want to base the Retail Price on
the Cost Price
Any Help appreciated
Regards
Manfred

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Norbert Lieckfeldt | last post by:
MS Access 2002 here. I am just trying to set up a simple database for a friend who's an optician. Basically, all clients with address details, date of last eyetest and a drop-down combo box to...
2
by: hhathome | last post by:
In my report I have a calculated DateDiff Field, I also have a calculated count field. I'm trying to get a total of the DateDiff field and dividing it by the count field and I'm having problems --...
2
by: markm75c | last post by:
Does anyone know of a way to sort a column which isnt databound or an actual field in the database, but is derived from a method? IE. I have a grid showing stats for softball, with a calculated...
2
by: ey.markov | last post by:
Greetings, in A2K VBA, I set the following recordset: Set rsGPValue = dbs.OpenRecordset("SELECT *, DateSerial(Year(),Month()+4,0) FROM tblGPValue AS OurDate, dbOpenSnapshot) and then I try...
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: Henrik | last post by:
The problem is (using MS Access 2003) I am unable to retrieve long strings (255 chars) from calculated fields through a recordset. The data takes the trip in three phases: 1. A custom public...
2
by: jcf378 | last post by:
hi all. I have a form which contains a calculated control ("days") that outputs the # of days between two dates (DateDiff command between the fields and ). However, when I click "Filter by...
9
by: Haas C | last post by:
Hi all! Is there anyway I can override a value in a calculated field on a form? For example: I have a form which displays the following fields based on a query: Premium Due field has the...
3
by: Matthew Wells | last post by:
If I have a calculated field that returns a value from a udf, does that field get calculated even when it's not being used in a Select statement? I knw that if a calculated field's formula is...
2
by: mkbrady | last post by:
I have a query that includes calculated fields that generate numeric results. I have wrapped conversion functions CLng() and CDdl() around the calculated fields to ensure the data types are...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.