DaniBoy
Registered User.
- Local time
- Today, 14:11
- Joined
- Nov 18, 2001
- Messages
- 174
Hello guys,
I am trying to make an iif statement that will give me a result of a sum depending on the criteria:
I have a fieild on my products table that gives me the total units per package example: 24 units per box. and I have a total units bought.
Now, what I did in my subform was to put the total units bought field there plus the other bound fields that I need like SubInvoice ect.
I also put two unbound fields " PerPackage" and "PerUnits" this way the person inputing the info can ether put the number of boxes bought for that product or the units if less then one box was bought. I also want the total to be the recorded on the total units bought field for inventory.
This is what I have so far:
=IIf(IsNull([txtperpackage]),0,([txtperpackage]*[UnitsPerPackage]))
that works fine, How do I tell it to also look to see if there was any units bought and if there was to add it to the fisrt result.
I tried this:
=IIf(IsNull([txtperpackage]),0,([txtperpackage]*[UnitsPerPackage])) and IIf(IsNull([txtperUnit]),0,([txtperpackage]+[txtPerUnit]))
it does not work
Thanks
DaniBoy
I am trying to make an iif statement that will give me a result of a sum depending on the criteria:
I have a fieild on my products table that gives me the total units per package example: 24 units per box. and I have a total units bought.
Now, what I did in my subform was to put the total units bought field there plus the other bound fields that I need like SubInvoice ect.
I also put two unbound fields " PerPackage" and "PerUnits" this way the person inputing the info can ether put the number of boxes bought for that product or the units if less then one box was bought. I also want the total to be the recorded on the total units bought field for inventory.
This is what I have so far:
=IIf(IsNull([txtperpackage]),0,([txtperpackage]*[UnitsPerPackage]))
that works fine, How do I tell it to also look to see if there was any units bought and if there was to add it to the fisrt result.
I tried this:
=IIf(IsNull([txtperpackage]),0,([txtperpackage]*[UnitsPerPackage])) and IIf(IsNull([txtperUnit]),0,([txtperpackage]+[txtPerUnit]))
it does not work
Thanks
DaniBoy