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
|
|||
|
|||
Problems with Totaling
I have a form that is designed for ticket sales input (for a benefit Fish
Fry). We sell different packages so the fields are set up like this: I have a field for the number of whichever package they have purchased that is input by me. The next field on the form is just a calculating field the calculates the cost of that particular package based on the number of packages the buyer purchased and how much it is. Regular Regular Total Small Fry Small Fry Total Big Cat Big Cat Total 2 $16.00 3 $12.00 1 $320 The total field is simply the number of tickets multiplyed by the cost of that ticket package, so Regular Tickets are $8 each, Small Fry are $4 each, and Big Cats are $320 each. Some of our patrons also choose to add an extra donation, so I also have a field for Other Donations. I simply input the donation amount (formatted as currency). Now I am trying to get a grand total of each patron's account. In other words if John Doe purchases 2 Regular tickets and 2 Small Fry tickets his grand total should be $24.00. I have no problem getting this to calculate. The problem is when I try to throw the Other Donations field into my calculations to get an exact total of how much money each patron gave us, including for tickets and a donation. Since I'm no expert and am self taught, there may be an easier way to write the expression than I have used, but it works (except for the Other Donations part). Here is my expression: =([Regular Total])+([Small Fry Total])+([Big Cat]) (These being the name of the calculated fields) This gives me the overall total of everything. However when I add the Other Donations to it I get only a grand total of other donations. Here's the expression I used for that: =([Regular Total]+[Small Fry Total]+[Big Cat]+[Other Donations]) Once I try to include the Other Donations in this calculation it only gives me the total of Other Donations and nothing else. All the other fields are calculated fields except Other Donations, so I'm wondering if that's the problem. I even tried to make a "total" field for Other Donations where I just multiply [Other Donations]*1 and then tried using that Total field in my expression, but I get the same results....if Other Donations is added to my expression in any way, the grand total shows ONLY the amount of each donation. If I leave it off, it adds up each patron's choices and gives me a grand total. Can anybody help me with this? Thanks in advance! |
#2
|
|||
|
|||
Problems with Totaling
Do not use the text box names on the form but use the field names of the raw
data. What are the field names in the table that store the data? Maybe this -- Grand_Total: (Nz([Regular], 0) * 8) + (Nz([Small Fry], 0) * 4) + (Nz([Big Cats], 0) * 320) + Nz([Donation], 0) -- Build a little, test a little. "CRBI" wrote: I have a form that is designed for ticket sales input (for a benefit Fish Fry). We sell different packages so the fields are set up like this: I have a field for the number of whichever package they have purchased that is input by me. The next field on the form is just a calculating field the calculates the cost of that particular package based on the number of packages the buyer purchased and how much it is. Regular Regular Total Small Fry Small Fry Total Big Cat Big Cat Total 2 $16.00 3 $12.00 1 $320 The total field is simply the number of tickets multiplyed by the cost of that ticket package, so Regular Tickets are $8 each, Small Fry are $4 each, and Big Cats are $320 each. Some of our patrons also choose to add an extra donation, so I also have a field for Other Donations. I simply input the donation amount (formatted as currency). Now I am trying to get a grand total of each patron's account. In other words if John Doe purchases 2 Regular tickets and 2 Small Fry tickets his grand total should be $24.00. I have no problem getting this to calculate. The problem is when I try to throw the Other Donations field into my calculations to get an exact total of how much money each patron gave us, including for tickets and a donation. Since I'm no expert and am self taught, there may be an easier way to write the expression than I have used, but it works (except for the Other Donations part). Here is my expression: =([Regular Total])+([Small Fry Total])+([Big Cat]) (These being the name of the calculated fields) This gives me the overall total of everything. However when I add the Other Donations to it I get only a grand total of other donations. Here's the expression I used for that: =([Regular Total]+[Small Fry Total]+[Big Cat]+[Other Donations]) Once I try to include the Other Donations in this calculation it only gives me the total of Other Donations and nothing else. All the other fields are calculated fields except Other Donations, so I'm wondering if that's the problem. I even tried to make a "total" field for Other Donations where I just multiply [Other Donations]*1 and then tried using that Total field in my expression, but I get the same results....if Other Donations is added to my expression in any way, the grand total shows ONLY the amount of each donation. If I leave it off, it adds up each patron's choices and gives me a grand total. Can anybody help me with this? Thanks in advance! |
Thread Tools | |
Display Modes | |
|
|