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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to create a calculating control on a form



 
 
Thread Tools Display Modes
  #1  
Old January 28th, 2006, 07:20 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How to create a calculating control on a form

I have a form with a field called CurrentInvoiceAmt. I would like to enter a
dollar amount into this field and have it automatically transferred to a
field called TotalInvoiced. Each time a new invoice is generated, I would
type the dollar amount in that CurrentInvoiceAmt field (which clears the
previous value) and the new value would be automatically added to the
existing value in the TotalInvoiced field. I would rather not have several
Invoice fields and sum them in a separate control. Thank you so much for your
help.

Marilyn
  #2  
Old January 28th, 2006, 08:45 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How to create a calculating control on a form

Marilyn,
I think this is what you want...
Use the AfterUpdate event of CurrentInvoiceAmt...
TotalInvoiced = TotalInvoiced + CurrentInvoiceAmt
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


"Marilyn" u18181@uwe wrote in message news:5b0ba0b711a06@uwe...
I have a form with a field called CurrentInvoiceAmt. I would like to enter
a
dollar amount into this field and have it automatically transferred to a
field called TotalInvoiced. Each time a new invoice is generated, I would
type the dollar amount in that CurrentInvoiceAmt field (which clears the
previous value) and the new value would be automatically added to the
existing value in the TotalInvoiced field. I would rather not have several
Invoice fields and sum them in a separate control. Thank you so much for
your
help.

Marilyn



  #3  
Old January 28th, 2006, 09:14 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How to create a calculating control on a form

Thank you for your suggestion. I will try it and reply one way or another.
Marilyn

"Al Camp" wrote:

Marilyn,
I think this is what you want...
Use the AfterUpdate event of CurrentInvoiceAmt...
TotalInvoiced = TotalInvoiced + CurrentInvoiceAmt
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


"Marilyn" u18181@uwe wrote in message news:5b0ba0b711a06@uwe...
I have a form with a field called CurrentInvoiceAmt. I would like to enter
a
dollar amount into this field and have it automatically transferred to a
field called TotalInvoiced. Each time a new invoice is generated, I would
type the dollar amount in that CurrentInvoiceAmt field (which clears the
previous value) and the new value would be automatically added to the
existing value in the TotalInvoiced field. I would rather not have several
Invoice fields and sum them in a separate control. Thank you so much for
your
help.

Marilyn




  #4  
Old January 28th, 2006, 09:46 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How to create a calculating control on a form

Al,

I tried your suggestion by going to the AfterUpdateEvent property of the
CurrentInvoiceAmt control on the form and typed in the expression you listed.
Nothing happened when I entered data into the CurrentInvoiceAmt field. The
TotalInvoiced field remained empty. Do I have to write a macro to generate
the action. Thank you.

"Marilyn" wrote:

Thank you for your suggestion. I will try it and reply one way or another.
Marilyn

"Al Camp" wrote:

Marilyn,
I think this is what you want...
Use the AfterUpdate event of CurrentInvoiceAmt...
TotalInvoiced = TotalInvoiced + CurrentInvoiceAmt
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


"Marilyn" u18181@uwe wrote in message news:5b0ba0b711a06@uwe...
I have a form with a field called CurrentInvoiceAmt. I would like to enter
a
dollar amount into this field and have it automatically transferred to a
field called TotalInvoiced. Each time a new invoice is generated, I would
type the dollar amount in that CurrentInvoiceAmt field (which clears the
previous value) and the new value would be automatically added to the
existing value in the TotalInvoiced field. I would rather not have several
Invoice fields and sum them in a separate control. Thank you so much for
your
help.

Marilyn




  #5  
Old January 28th, 2006, 10:36 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How to create a calculating control on a form

Marylyn,
I think what you're saying is that you typed the expression right into
the box beside the AfterUpdate property. That's not where it would go...
With your cursor in the AfterUpdate property box, click the little down
arrow on the right, and select [Event Procedure]
Now, click the 3 dot box on the right, and that will take you into the
module for the form... between these 2 lines of code...

Private Sub CurrentInvoiceAmt_AfterUpdate()

End Sub

This where the code goes that you want to execute on the AfterUpdate
event of CurrentInvoiceAmt.
Now, place the code I gave you between the lines...

Private Sub CurrentInvoiceAmt_AfterUpdate()
TotalInvoiced = TotalInvoiced + CurrentInvoiceAmt
End Sub

Exit the module and return to your form design, run the form, enter a
CurrentInvoiceAmt, and test.
That should do it...
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


"Marilyn" wrote in message
news
Al,

I tried your suggestion by going to the AfterUpdateEvent property of the
CurrentInvoiceAmt control on the form and typed in the expression you
listed.
Nothing happened when I entered data into the CurrentInvoiceAmt field. The
TotalInvoiced field remained empty. Do I have to write a macro to generate
the action. Thank you.

"Marilyn" wrote:

Thank you for your suggestion. I will try it and reply one way or
another.
Marilyn

"Al Camp" wrote:

Marilyn,
I think this is what you want...
Use the AfterUpdate event of CurrentInvoiceAmt...
TotalInvoiced = TotalInvoiced + CurrentInvoiceAmt
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


"Marilyn" u18181@uwe wrote in message news:5b0ba0b711a06@uwe...
I have a form with a field called CurrentInvoiceAmt. I would like to
enter
a
dollar amount into this field and have it automatically transferred
to a
field called TotalInvoiced. Each time a new invoice is generated, I
would
type the dollar amount in that CurrentInvoiceAmt field (which clears
the
previous value) and the new value would be automatically added to the
existing value in the TotalInvoiced field. I would rather not have
several
Invoice fields and sum them in a separate control. Thank you so much
for
your
help.

Marilyn





  #6  
Old January 29th, 2006, 03:53 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default How to create a calculating control on a form

Al,
I entered the code as you suggested and it worked. Thank you so very much for
your help.
Marilyn

Al Camp wrote:
Marylyn,
I think what you're saying is that you typed the expression right into
the box beside the AfterUpdate property. That's not where it would go...
With your cursor in the AfterUpdate property box, click the little down
arrow on the right, and select [Event Procedure]
Now, click the 3 dot box on the right, and that will take you into the
module for the form... between these 2 lines of code...

Private Sub CurrentInvoiceAmt_AfterUpdate()

End Sub

This where the code goes that you want to execute on the AfterUpdate
event of CurrentInvoiceAmt.
Now, place the code I gave you between the lines...

Private Sub CurrentInvoiceAmt_AfterUpdate()
TotalInvoiced = TotalInvoiced + CurrentInvoiceAmt
End Sub

Exit the module and return to your form design, run the form, enter a
CurrentInvoiceAmt, and test.
That should do it...
Al,

[quoted text clipped - 31 lines]

Marilyn


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200601/1
 




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
Dynamically Add User Control Terry Holland Database Design 2 November 28th, 2005 08:48 AM
Scrolling text on splash screen Damon Using Forms 20 November 3rd, 2005 10:37 PM
strategy for data entry in multiple tables LAF Using Forms 18 April 25th, 2005 04:04 AM
dlookup miaplacidus Using Forms 9 August 5th, 2004 09:16 PM
Access Calendar lost General Discussion 2 July 7th, 2004 04:58 AM


All times are GMT +1. The time now is 05:34 AM.


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