473,398 Members | 2,404 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,398 software developers and data experts.

Writing Calculated Query Values To A Table

I have a form that is using query as the backend 'table'. I did this so that I could display query fields in my form that have been calculated.

1. How do I write those query field values to a table?

2. Is it possible to calculate what I am doing in the actual table field properties instead of trying to do it in a query and then write it to a table?

3. Is it possible to bound the calculation to a field in my table?

Thanks for your help!
Oct 3 '07 #1
1 1856
MikeTheBike
639 Expert 512MB
I have a form that is using query as the backend 'table'. I did this so that I could display query fields in my form that have been calculated.

1. How do I write those query field values to a table?

2. Is it possible to calculate what I am doing in the actual table field properties instead of trying to do it in a query and then write it to a table?

3. Is it possible to bound the calculation to a field in my table?

Thanks for your help!
Hi

In my experiance (which is still not complete!) the answers to your three questions are

1. Use VB code behind a button to construct an Update or Append query string (SQL) and execute this with either
CurrentDb.Execute SQL
or
DoCmd.RunSQL SQL
or
CurrentProject.Connection.Execute SQL

Whichever you are happiest with

2. Not as far as I know

3. Not as far as I know

But other may (do) know more than me!

Having said all that, normally it is considered bad practice to store calulated values if the calcs are based on static data (doesn't change), because you can calculate it again at any time. However, if, for instance, these are invoice values based on rates that will change in the future, then it is essential the value(s) are stored.

MTB
Oct 3 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Manfred | last post by:
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...
5
by: Richard Holliingsworth | last post by:
Hello: Thanks for reading this post. I need to create a metrics (form or report - I don't care which) to display calculated fields about the database (A2002 front end to SQL Server 2K) 1) I...
5
by: John Bahran | last post by:
I am trying to use calculated fields in my query but all the results are zero ven when they're not. Please help. Thanks.
5
by: MX1 | last post by:
Oh boy, this is kind of a big one. I have a form with several calculated fields on spanning 5 rows. I somehow need to get the field values into a table. Challenge is I don't know how to do this....
11
by: James Hallam | last post by:
I have read through all the past topics and couldn't find what I was after so... I am looking to store some calculated values (don't flame just yet, just read on!). I have an piece of code...
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...
3
by: fperri | last post by:
Hello, I have a calculated field in my query that uses a function to come up with the value. The function has various fields from the table used in the query passed into it as parameters. For some...
3
NatronA111
by: NatronA111 | last post by:
I am having a problem with calculated fields (...the most important one in the database!) in an MS Access query that pulls info from one table and a few other calculated fields stored in other...
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: 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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.