Re: conditional script?
There are a couple ways you can do this. Either by 'if' statements or 'case' statements. But let's do the 'if' route.
First the field that contains the Item Description, make this a list box and populate it from a value list. Then your Item Price field would be a calculating field, with it's results as a number.
It would be something like this:
If(ItemDescription = "Widgets","2.99",
If(ItemDescription = "Sprokets, "1.75",
If(ItemDescription = "Spokes", "4.35","")))
In the layout format the item price field number as currency.
You can add up to 255 line statements. Using the value list to define your description field is to make sure that your description text remains the same.
You can add more items, as needed, into your description field value list and simlpy add the items in the If statements calculation.
Originally posted by tykesplace
I need to make an item price field that is automatically filled in when an item number is selected from a list.
Example, when selecting Part123 from the item number list then item price field should update to $10. But change the item to Part345 then the price field should update to $20. I need to make this work for at least 80 items but be able to add more later.
Your help is greatly appreciated.
Last edited by RickKnight; 12-10-03 at 15:13.
KnightShift Office Solutions and Horse Breaking
VB, VBA, FileMaker, Access Solutions, Web Solutions