Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 15th, 2005, 09:28 AM
kaiser kaiser is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 5 kaiser User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 24 m 35 sec
Reputation Power: 0
Question calculations between fields in a form

how can you do a calculation between two text boxes within a form (frmPerson)? I have a field with 'AmountPaid' and one with 'AmountDue', the AmountDue is worked out from Cost (located in tblMemberType, but not seen on frmPerson) minus the AmountPaid (located in tblPaymentHistory).


Also, am i correct in thinking that the AmountDue should not be in any table, as it is simply a calculation? if so, how is this added to the form, as when attempting to crack this problem, i recreated my person form, adding in amount paid, from a select query. this appeared to work, until you try to edit information in the table, at which point, it is all locked. any ideas?
Comments on this post
thompson disagrees!

Reply With Quote
  #2  
Old February 15th, 2005, 10:34 AM
alex_lee822 alex_lee822 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 43 alex_lee822 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 41 m 15 sec
Reputation Power: 4
um.. try putting a textbox (naming it AmountDue) in your frmPerson form and put the calculation formula:

=[Tables]![MemberType]![Cost]-[Tables]![PaymentHistory]![AmountPaid]

I'm not sure if it works tho

Reply With Quote
  #3  
Old February 16th, 2005, 05:31 AM
kaiser kaiser is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 5 kaiser User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 24 m 35 sec
Reputation Power: 0
This isnt working for me, am i right in thinking that this should go in the Expression Builder?

The form is based on a query, on top of the table - dont know if that has anything to do with my problem.

Reply With Quote
  #4  
Old February 16th, 2005, 10:29 AM
xpetex xpetex is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 56 xpetex User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 h 50 m 7 sec
Reputation Power: 4
=Sum([Tables]![MemberType]![Cost]-[Tables]![PaymentHistory]![AmountPaid])

something like I think?

Reply With Quote
  #5  
Old February 17th, 2005, 06:59 AM
kaiser kaiser is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 5 kaiser User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 24 m 35 sec
Reputation Power: 0
its still not working for me - although im not totally sure where i should place that expression.

i've tried getting it working through queries, but, i can only manage to get the calculation as an expression, within a select query. is there a way of displaying this value without having to append it? (as the data shouldnt be in a table - as far as i can gather).

Reply With Quote
  #6  
Old February 17th, 2005, 10:24 AM
xpetex xpetex is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 56 xpetex User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 h 50 m 7 sec
Reputation Power: 4
in the Default avlue option on the properties dialogue.

Reply With Quote
  #7  
Old February 17th, 2005, 11:23 AM
kaiser kaiser is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 5 kaiser User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 24 m 35 sec
Reputation Power: 0
its still not working unfortunately. the text box just remains blank when that code is entered.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > calculations between fields in a form


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway