mathematical function

T

Travis

I am working with a table in Access that contains

Tracking number, invoice number, customer number, box
number, freight charge, ship via rate. we have two
customers ABC001 and DEF002 that have special freight
charge rules. for ABC001 their freight charge is 4.50
less than the value in freight charge and for DEF002
their freight charge is 2.50 less than the value in
freight charge. How can I code a function to pass
through access and make these changes for the given
customers? thank you in advance :)
 
W

Wayne Morgan

Add a field to the customer table that will contain the value of their
discount. When you compute the charge, subtract the value of this field from
the standard charge field then multiply by the weight, number of items, or
whatever you use.
 
G

Guest

How do I code the subtraction if I set it up this way.
there is no need to multiply it by weight or anything,
this value will be the final freight charge.
 
W

Wayne Morgan

You would change the freight charge control (textbox) to a calculated
control. The form's recordset would need to include both fields, the
standard rate charge and the discount for the user, or you will need to use
the DLookup function to get the values.

In the textbox, you would list both fields similar to
=[FreightCharge] - Nz([FreightDiscount], 0)

The Nz function will change a Null value to zero, so if there is no discount
entered for that customer then zero will be subtracted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top