Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Add field in orders
Roger Strate 
       
3 years ago
I am trying to add a new field in orders: "Deposit Amount" and Freight Charge on the order form. The current fields work just fine with the code =-Nz([DepositAmount])+Nz([FreightCharge])+[OrderDetailF].[Form]![SumExtPrice]. When I add the field netterms but when I add the field and edit the GrandTotal with this code: =-Nz([DepositAmount])-Nz([NetTerms])+Nz([FreightCharge])+[OrderDetailF].[Form]![SumExtPrice] I get the error "#Type" in the 2% NetTerm field and #Size in the GrandTotal field. The following is the code for the netterms field: =IIf([PaidDate]<=[OrderDueDate],[Total]*0.02,0). Any ideas why this isn't working. I wll send an image of my Order Form.
Roger Strate OP  @Reply  
       
3 years ago

Roger Strate OP  @Reply  
       
3 years ago

Kevin Robertson  @Reply  
          
3 years ago
The problem is you are creating a Circular Reference when you use OrderTotal in your IIF in the NetTerms field before it has been calculated and because of this the OrderTotal is also generating an error when you use NetTerms which can't be calculated because of the error.

I would add a Subtotal textbox which you can hide if you don't need to see it.

This is what I would put in each of the Control Sources:

Subtotal
=[OrderDetailF].[Form]![SumExtPrice]-Nz([DepositAmount])+Nz([FreightCharge])

NetTerms
=IIf([PaidDate]<=[OrderDueDate],[Subtotal]*0.02,0)

Total
=Nz([Subtotal])-Nz([NetTerms])
Roger Strate OP  @Reply  
       
3 years ago
Thank you so much Kevin, that works perfectly. I appreciate your skills and time.
Kevin Robertson  @Reply  
          
3 years ago
You're welcome.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/6/2026 7:37:06 PM. PLT: 1s