Whats the best way to arrange my data for the following, and can a query do it or do I need to use VBA with an "if" command?
I have the following data in my products table....
Courier is a lookup for my courier table which is like this....
So my query or whatever needs to return the Shipping price for each product. eg. Guitar case it needs to first determine it's DHL (which I've done withe the lookup) but then, and this is the bit I'm struggling with, it needs to determine that it's over 250g and return the correct value (£6 in this case)
Have I got my data set out in the optimum way? Do I need VBA to do this - I find myself wanting to type IF.... into the query
Any help much appreciated.
Cheers,
Dave
I have the following data in my products table....
Code:
[B]Products[/B] [B]Courier[/B] [B]Weight (g)[/B]
Guitar Case DHL 700
Guitar Strings Royal Mail 89
Tambourine Royal Mail 150
Courier is a lookup for my courier table which is like this....
Code:
[B]Courier[/B] [B] 0-100g Cost[/B] [B]100-250g Cost[/B] [B]250g+ Cost[/B]
DHL £4 £4 £6
Royal Mail £0.93 £1.19 £1.53
So my query or whatever needs to return the Shipping price for each product. eg. Guitar case it needs to first determine it's DHL (which I've done withe the lookup) but then, and this is the bit I'm struggling with, it needs to determine that it's over 250g and return the correct value (£6 in this case)
Have I got my data set out in the optimum way? Do I need VBA to do this - I find myself wanting to type IF.... into the query
Any help much appreciated.
Cheers,
Dave