A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

calculated field



 
 
Thread Tools Display Modes
  #1  
Old March 13th, 2006, 01:02 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default calculated field

I have a control on my form "totalmileage"
in the control source for "totalmileage", i
have "=[endmileage]-[startmileage].
It is calculating fine, however, i need to record
it to the "dispatchtable" under "totalmileage" or a
different field name.
I tried putting the calculation under default value, and assigning
control source to "totalmileage" for the table, however
the calculation does not show up, and it doesn't record
to the table.
Any help please.
TOM

  #2  
Old March 13th, 2006, 02:17 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default calculated field

On Sun, 12 Mar 2006 17:02:27 -0800, Tom wrote:

I have a control on my form "totalmileage"
in the control source for "totalmileage", i
have "=[endmileage]-[startmileage].
It is calculating fine, however, i need to record
it to the "dispatchtable" under "totalmileage" or a
different field name.
I tried putting the calculation under default value, and assigning
control source to "totalmileage" for the table, however
the calculation does not show up, and it doesn't record
to the table.
Any help please.
TOM


You are using Access, a database, not Excel, a spreadsheet.

As long as you have saved the [EndMileage] and [StartMileage] data
anytime you need the result simply calculate it, as you do in your
above expression.
Do not store calculated data.
That's the proper Access method.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #3  
Old March 13th, 2006, 02:24 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default calculated field

Do you have a good reason for storing a value that can be calculated? If so,
you would need to add some code in the after udpate event of the text boxes.

--
Duane Hookom
MS Access MVP
--

"Tom" wrote in message
...
I have a control on my form "totalmileage"
in the control source for "totalmileage", i
have "=[endmileage]-[startmileage].
It is calculating fine, however, i need to record
it to the "dispatchtable" under "totalmileage" or a
different field name.
I tried putting the calculation under default value, and assigning
control source to "totalmileage" for the table, however
the calculation does not show up, and it doesn't record
to the table.
Any help please.
TOM



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding calculated field with null results Dalni Setting Up & Running Reports 2 May 24th, 2005 03:02 AM
Calculated date field in form to table sendahook Using Forms 6 March 31st, 2005 02:38 PM
Calculated Field Access 2002 Cathy C General Discussion 4 March 24th, 2005 09:47 PM
Design help, please SillySally Using Forms 27 March 6th, 2005 04:11 AM
NUMBERING the pages Bob New Users 7 June 14th, 2004 12:20 AM


All times are GMT +1. The time now is 11:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.