When I say I want a 100% profit margin we end up dividing by 0 so get an error message. D = CDbl(S) / 100 so if S is 100 we end up with 1. then in UnitPrice we divide by D - 1 so 1 - 1 which is 0. do we just never say we want 100% margin? lol. Is this an error in the code? or we just never should ask for a 100* margin?
Sami Shamma
@Reply 15 months ago
Just check for that condition and adjust your formula accordingly.
Shallena AyersOP
@Reply 15 months ago
Got it... I kept waiting for Rick to see the error and address it then wondered if i missed something so rewatched... read through the code again... I kept thinking it had do be me lol. Thanks Sami
Shallena AyersOP
@Reply 15 months ago
Can I ask you another question Sami? In this lesson we calculate the profit, the margin, the Markup and the total unit cost. The calculations are done in the forms. Is there a way to access that information and put it into a continuous form type format so we could see all of the products numbers for each product? i tried a query referencing the box and it doesnt pull the calculated value. i am thinking that if the calculations are being done in the form that the results are only available when the form is open? So we cant do anything with the numbers?
Sami Shamma
@Reply 15 months ago
Hi Shallena Reproduce the same calculations in the query without referencing the form.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Developer 29.