473,378 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

calculations and formatting issues

imrosie
222 100+
Hello All,

I'm having trouble calculating my sales tax, adding freight charges and sale tax to the 'Order Total'. Help someone......

I have 2 subforms on a Main form....

In subform 1(called Order Details Subform) , I calculate 'TheOrderDetailTotal (from unitprice X quantity It calculates successfully and displays on the Main form in a control labeled 'Order Subtotal'.

Code:
=Forms![Add an Order and Details]![Order Details Subform].Form!TheOrderDetailTotal


The problem comes in when I attempt to add calculate sales tax, and then add that sales tax and freight charge to the 'Order Total' control. I can't seem to get it formatted properly to make it sum up together. Both controls 'FreightCharge' and 'SaleTaxAlone' are subform 2 (called Order Ship Details Subform).

The sales tax rate (by default is 6%) so the control is 6% until someone adds a different rate, this control is called:'ANewSalesTax'.

I'm just having trouble getting the 'SalesTaxAlone control working and then adding that amount along with Freight Charges to the 'Order Total' control. I've scrambled parenthesis everywhere,,,but here's the latest rendition of what's not working:


'SalesTaxAlone':
Expand|Select|Wrap|Line Numbers
  1. =Forms![Add an Order and Details]![Order Details Subform].Form!AnOrderDetailTotal*Forms![Add an Order and Details]![Order Ship Details Subform].Form!ANewSalesTax
'TheOrderTotal':
Expand|Select|Wrap|Line Numbers
  1. =(Sum(Forms![Add an Order and Details]!TheOrderDetailTotal)+(Forms![Add an Order and Details]![Order Ship Details Subform].Form!FreightCharge)+(Forms![Add an Order and Details]![Order Ship Details Subform].Form!SalesTaxAlone))
thanks for your help...
Rosie
Sep 11 '07 #1
2 1244
Scott Price
1,384 Expert 1GB
Hello All,

I'm having trouble calculating my sales tax, adding freight charges and sale tax to the 'Order Total'. Help someone......

I have 2 subforms on a Main form....

In subform 1(called Order Details Subform) , I calculate 'TheOrderDetailTotal (from unitprice X quantity It calculates successfully and displays on the Main form in a control labeled 'Order Subtotal'.

Code:
=Forms![Add an Order and Details]![Order Details Subform].Form!TheOrderDetailTotal


The problem comes in when I attempt to add calculate sales tax, and then add that sales tax and freight charge to the 'Order Total' control. I can't seem to get it formatted properly to make it sum up together. Both controls 'FreightCharge' and 'SaleTaxAlone' are subform 2 (called Order Ship Details Subform).

The sales tax rate (by default is 6%) so the control is 6% until someone adds a different rate, this control is called:'ANewSalesTax'.

I'm just having trouble getting the 'SalesTaxAlone control working and then adding that amount along with Freight Charges to the 'Order Total' control. I've scrambled parenthesis everywhere,,,but here's the latest rendition of what's not working:


'SalesTaxAlone':
Expand|Select|Wrap|Line Numbers
  1. =Forms![Add an Order and Details]![Order Details Subform].Form!AnOrderDetailTotal*Forms![Add an Order and Details]![Order Ship Details Subform].Form!ANewSalesTax
'TheOrderTotal':
Expand|Select|Wrap|Line Numbers
  1. =(Sum(Forms![Add an Order and Details]!TheOrderDetailTotal)+(Forms![Add an Order and Details]![Order Ship Details Subform].Form!FreightCharge)+(Forms![Add an Order and Details]![Order Ship Details Subform].Form!SalesTaxAlone))
thanks for your help...
Rosie
Hi Rosie,

Check your spelling very carefully... I notice that in your first line you refer to the control TheOrderDetailTotal on your subform [Add an Order and Details] while later on you refer to AnOrderDetailTotal on the same subform.

Regards,
Scott
Sep 19 '07 #2
NeoPa
32,556 Expert Mod 16PB
Rosie,

Let's start by uncomplicating matters where we can.
I suggest we start with the [SalesTaxAlone] control on [Order Ship Details Subform] form.
We need to create a formula consisting of two values ([AnOrderDetailTotal] & [ANewSalesTax]) which are multiplied together. The first thing we need to do is to set [SalesTaxAlone] to each of the two values separately (to ensure that our method of reference is working as expected). When the first is working as intended, change it to the second and work on that until it too is working.

Post back when this is fully working (You can include the actual code used for both references).
If you have difficulty getting either of these to work then post back in that case too, explaining your situation.
Sep 19 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Dan Weeb | last post by:
Hi All, I have struggled through this far with help from many of you so thanks. I am stuck again. I am really new to this so don't be harsh :-) There are a few problems. You can run the script...
11
by: lduperval | last post by:
Hi, I`m trying to do date calculations in three types of time zones: local, GMT and specified. The issue I am facing is that I need to be able to specify a date in the proper time zone, and I`m...
2
by: Eddy Bee | last post by:
Hi there, I'm encountering an inexplicable problem with page formatting in reports. Here's the easiest way to explain it: The Detail section of my report contains two elements: And let's...
2
by: Megan | last post by:
Can you write conditional VBA code that affects only one or two records on a continuous subform? I have a form with a subform on it. The parent/ child field that links the forms is CaseID. The...
25
by: mdh | last post by:
Hi Group, Not looking for an answer, but more of an explanation. Thinking back to those heady days when you had the time to do them, may I ask this. Exercise 1-22 asks for a program to "fold"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.