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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How can I perform currency addition in a form and store it in a t.
I have made a form that adds the AIRFARE$+LODGING$+MISC$+CARRENTAL$, and
stores the answer under TOTAL$. It performs the addition correctly in FORM, but in my TABLE only the airfare, lodging, misc, and carrental is being stored, the TOTAL$ is not being stored automatically. I want to know some expression or a way I can perform the addition in FORMS and store the data in TABLE. |
#2
|
|||
|
|||
Normally, the result of calculations are not stored in the database. Since
it can be recalculated at any time, there is no point. In this particular case there is no point whatsoever since all the elements of the calculation are being stored. If you absolutely need to store it (like if a dumbass threatens your job if you don't) you can do it by pushing the data in to a bound field instead of pulling it into an unbound one. In the AfterUpdate event of EACH of the elements write an event procedure like: Sub AIRFARE$_AfterUpdate() Me.TOTAL$ = NZ(AIRFARE$,0)+NZ(LODGING$,0)+NZ(MISC$,0)+NZ(CARRE NTAL$,0) End Sub -- Arvin Meyer, MCP, MVP Microsoft Access Free Access downloads: http://www.datastrat.com http://www.mvps.org/access "KiarBST" wrote in message ... I have made a form that adds the AIRFARE$+LODGING$+MISC$+CARRENTAL$, and stores the answer under TOTAL$. It performs the addition correctly in FORM, but in my TABLE only the airfare, lodging, misc, and carrental is being stored, the TOTAL$ is not being stored automatically. I want to know some expression or a way I can perform the addition in FORMS and store the data in TABLE. |
#3
|
|||
|
|||
This is how my data entry works. I open up a FORMS file called [Input form
for Orders]. I enter all the travel information needed to send people on business trips, City Destination, Airport codes, Airfare, Per Diem, Misc, and Car Rental, etc. That information is stored into a TABLE file called [ORDERS]. I now have 2 other FORM files called [TAD WORKSHEET] and [TAD ORDERS] that retrieve the information stored in TABLE [ORDERS]. [TAD WORKSHEET] is a worksheet to send to a travel agency to make reservations and [TAD ORDERS] is the official government travel document that they must show that they are traveling under government orders. That is why I was needing the TOTAL$ stored. I was hoping for a one-time execution, but it seems I will have to duplicate the travelling addition two more times. Thanks, Stan "Arvin Meyer" wrote: Normally, the result of calculations are not stored in the database. Since it can be recalculated at any time, there is no point. In this particular case there is no point whatsoever since all the elements of the calculation are being stored. If you absolutely need to store it (like if a dumbass threatens your job if you don't) you can do it by pushing the data in to a bound field instead of pulling it into an unbound one. In the AfterUpdate event of EACH of the elements write an event procedure like: Sub AIRFARE$_AfterUpdate() Me.TOTAL$ = NZ(AIRFARE$,0)+NZ(LODGING$,0)+NZ(MISC$,0)+NZ(CARRE NTAL$,0) End Sub -- Arvin Meyer, MCP, MVP Microsoft Access Free Access downloads: http://www.datastrat.com http://www.mvps.org/access "KiarBST" wrote in message ... I have made a form that adds the AIRFARE$+LODGING$+MISC$+CARRENTAL$, and stores the answer under TOTAL$. It performs the addition correctly in FORM, but in my TABLE only the airfare, lodging, misc, and carrental is being stored, the TOTAL$ is not being stored automatically. I want to know some expression or a way I can perform the addition in FORMS and store the data in TABLE. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need to clear controls of Filter form | Jan Il | Using Forms | 2 | November 28th, 2004 02:04 PM |
Dates in a listbox connected to a form... | RusCat | Using Forms | 13 | November 25th, 2004 02:31 AM |
Need query to separate 2 entry types in a table field | Jan Il | Running & Setting Up Queries | 31 | November 23rd, 2004 05:57 PM |
dlookup | miaplacidus | Using Forms | 9 | August 5th, 2004 09:16 PM |
auto entry into second table after update | Tony | New Users | 13 | July 9th, 2004 10:42 PM |