Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with query or module????

Status
Not open for further replies.

mdctsg

MIS
May 26, 2002
102
0
0
US
Hello

I have an Access database. In my table I have 3 columns I need to work with. The first one is the shipping service type, the second is the packaging type, the third is the cost of shipping. There are several different shipping services and package types. What I need to do is input the discount rate we recieve for shipping the package. (See below)

IF......

Service Package Cost is Then Discount =



If...
Express and Letter and cost is 12.00 then Subtract 3.2 % from cost and populate in Cost field

Express and Box and cost is 20.00 then Subtract 5.7% from cost and populate in Cost field

Ground and Box and cost is 15.50 then Subtract 3.5% from cost and populate in Cost field

The Cost will vary. The important part is the service and package fields

I have about 21 different instances of this in the database. Does anyone have an ideal how I can get something to achieve my goal

Thank you
Bob
 
I would suggest adding a Select Case to the After Update event of the Cost field:

Select Case CostField:

Case is = 12
CostField = CostField - (CostField * .032)

Case is = 20
CostField = CostField - (CostField * .057)

End Case

You need to add a Case is = ## for each of your parameters

HTH





"I know what you're t'inkin', ma petite. Dat Gambit... still de suave one, no?"
 
Thanks for responding to my post

The cost field will change as each order is shipped.
What I need to do is if the shipping method = and the package field = then subtact the percent by the cost field.

Example

Service Package

Express Letter Then subtract 3.2 from Cost(Whatever it is)
Express Box Then subtract 5.7 from Cost(Whatever it is)
Ground Box Then subtract 3.5 from Cost(Whatever it is)

The Service and Package field will be constant. Always Express or Ground or International, and the Package fields will be either Box or Letter

Thanks
Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top