Marotta Posted February 2, 2005 Posted February 2, 2005 Is any-one able to help me i am currently making a database for a restraunt and I am trying to get a price to display when I select a type of drink followed by a size both these values should correspond to give the price any help on this matter would be greatly appreciated
BobWeaver Posted February 2, 2005 Posted February 2, 2005 There are a few ways to do this, but this is probably the simplest. Make a compound key field based on the type and size. So, assuming that your fields are called "DrinkType" and "Size," you could make a calculated key field "TypeSize" with the formula: DrinkType & Size Then use TypeSize as the key field to your price table relationship. Then in your related price table, you need to have a record for every drink type and size combination with a corresponding key field TypeSize. Like so: TypeSize Price -------------- BeerSmall $2.50 BeerMedium $3.00 BeerLarge $4.00 ScotchSmall $3.00 ScotchLarge $4.00 MartiniSmall $3.50 MartiniLarge $4.50 etc.
Marotta Posted February 2, 2005 Author Posted February 2, 2005 Thank you very much bob sorry about the double post people
Recommended Posts
This topic is 7233 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now