Computer Learning Zone CLZ Access Excel Word Windows

Learning is not attained by chance, it must be sought for with ardor and diligence.

-Abigail Adams
 
Home   Courses   Seminars   Templates   Help   TechHelp   Forums   Contact   Join   Order   Logon  
 
 
Multiple Unit Prices for A Product
By Richard Rost   Richard Rost on Twitter Richard Rost on LinkedIn Email Richard Rost   7 years ago

Today's Question of the Day comes from Colin M. He asks:

I need to set up my products unit costs from suppliers for purchase orders, and subsequently, multiple unit prices to my customers with different prices, to be inserted into an order form and invoices, and based upon the quantity that my customer orders.

For instance, Vendor XYZ prices his cost to me for say 100 to 199 widgets at $5.00 each, for 200 to 499 widgets at $4.00, 500 to 999 widgets at $3.00, and so forth. I need to record these in my product table at these costs, along with the corresponding sales price with a different sales price for each quantity range. Calculation of the Sales Price will be calculated outside of  Access in an Excel file.

I have not seen this problem addressed in the Lessons up through Expert Level 25.  Everything in the lessons seems to have just one fixed cost and sale price, regardless of quantity ordered.

Can anyone assist me with this?  Thanks in advance.


Reply from Richard Rost:

Interesting problem. I can't think of an easy NON-programming solution for this, so you'll need a little VBA or a macro when you add a product to your purchase order.

You will need to have a separate table to track pricing for each of your product price breaks. Let's call it ProductPriceT. It would have the ProductID (foreign key) and then a MinQty and Price. So for example, your table would look like:

ProductPriceT
1, 1, $1.99
1, 10, $1.59
1, 50, $0.99
2, 1, $200
2, 100, $150

This says that Product 1 would cost $1.99 in quantity 1-9, $1.59 in quantity 10-49, and $0.99 from 50 and up.

Product 2 would cost $200 for quantity 1 to 99, and $150 for quantity 100 and up.

Now, when you add a product to your purchase order, you'll have to look up the appropriate price from this table using a combination of DMAX and DLOOKUP. You'll need DMAX to find the largest price break equal to or less than the quantity you're ordering, and then DLOOKUP to pull that price. So for example:

LargestPriceBreak = DMAX("MinQty","ProductPriceT","MinQty<=" & QuantityOnOrder & " AND ProductID=" & ProductID)

This will find the largest price break for the product LESS THAN the quantity your ordered, for that particular product. So if the quantity is 45 and product ID is 1, it should return 10 (largest price break of 45 or LOWER). Now that you have that, you can return the unit cost:

UnitCost = DLOOKUP("Price","ProductPriceT","ProductID=" & ProductID & " AND MinQty=" & LargestPriceBreak

And there you have it. You now have the appropriate unit cost to assign to that line item of your purchase order. You can throw it in your button event that adds the product (like I did in Access Expert 22, Lesson 3).

Very good question. I'm going to make this the Question of the Day and possibly add it to a future class.

Multiple Unit Prices for A Product Upload Images   Link  
David R 
7 years ago
This is interesting as we prepare "Price Lists" for customers and they have different negotiated values and it is all on spreadsheets and pretty unmanageable.
Add a Reply

Start a NEW Conversation
 
Only students may post right now. Click here for more information on how you can set up an account. If you are a student, please LOG ON first.
 
Subscribe
 
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
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
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
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn
PermaLink