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 do I store calculations from a form into a table in Access?
I am performing a simple addition calculation in my form, adding up the
quantity that each store wants for each item eg.) Store AAA ; Store BBB Item One = 2 ; Item One = 3 ; ITEM ONE Total = 5 Item Two = 4 ; Item Two = 0 ; ITEM TWO Total = 4 The numbers 2, 3 were entered manually into the form and then the form totals all the quantities for Item 1 and gets 5. Then it adds the manually entered 4 and 0 and gets 4 for the total. The problem is that I need these totals to be stored back into my main table so I can use them for other forms, query's and reports. The manually entered numbers are stored properly since in the "Properties- Data- Control source" is the proper location for the entered values to be stored; but when doing the calculated totals above I could only get the totals to be added by putting my formula into that same "Control Source" box, thus it has no place to store the result. So is there any way to actually store these numbers back to my table with the rest of my data? I think if I could find somewhere else to put the formula in, or else some other place to input the location to store the data it would work. Another alternative I figure should work, but I could not figure out was, if I could just put the formula directly in my table and do the calculations there, instead of the form, everything would also work out. I really need help ASAP as this is for my work. Thanks for any help you can provide. |
#2
|
|||
|
|||
As has been said before, it's not very good practice to store a calculated
value in a table. My suggestion would be to create a query from the table that has the calculated values in it and use that query for forms, reports, etc. "Zirfas Ali" wrote: I am performing a simple addition calculation in my form, adding up the quantity that each store wants for each item eg.) Store AAA ; Store BBB Item One = 2 ; Item One = 3 ; ITEM ONE Total = 5 Item Two = 4 ; Item Two = 0 ; ITEM TWO Total = 4 The numbers 2, 3 were entered manually into the form and then the form totals all the quantities for Item 1 and gets 5. Then it adds the manually entered 4 and 0 and gets 4 for the total. The problem is that I need these totals to be stored back into my main table so I can use them for other forms, query's and reports. The manually entered numbers are stored properly since in the "Properties- Data- Control source" is the proper location for the entered values to be stored; but when doing the calculated totals above I could only get the totals to be added by putting my formula into that same "Control Source" box, thus it has no place to store the result. So is there any way to actually store these numbers back to my table with the rest of my data? I think if I could find somewhere else to put the formula in, or else some other place to input the location to store the data it would work. Another alternative I figure should work, but I could not figure out was, if I could just put the formula directly in my table and do the calculations there, instead of the form, everything would also work out. I really need help ASAP as this is for my work. Thanks for any help you can provide. |
#3
|
|||
|
|||
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Access 2000 ADP - error when applying form filter - error message "The column prefix XXX does not match with a table name or alias name used in the query" | Scott Crowley | Using Forms | 2 | November 26th, 2004 02:07 PM |
Dates in a listbox connected to a form... | RusCat | Using Forms | 13 | November 25th, 2004 02:31 AM |
Here's a shocker | Mike Labosh | General Discussion | 2 | October 26th, 2004 05:04 PM |
dlookup | miaplacidus | Using Forms | 9 | August 5th, 2004 09:16 PM |
Linking Excel data through Access to use a Form as an Interface | Laura | Links and Linking | 0 | March 23rd, 2004 03:59 PM |