I have a number of price fields in a form. I want to create a command button that will add them up and put them in a total field. I realize that I can do this with a query, but I need to be able to change the total field if I wish.
My main problem is that I haven't done code in Access in quite a few years and I don't remember much of the syntax. I tried something like
Set PriceTotalBox = Price1Text + Price2Text
However, I know the syntax isn't right. How do I reference objects in the code? I know it uses a dot, like PriceTotalBox.form, but I'm not sure. I'm not even sure where I can name the form object itself.
In addition, because the values are currency, will there be a problem with the addition?
Any help on this would be greatly appreciated. Thanks
My main problem is that I haven't done code in Access in quite a few years and I don't remember much of the syntax. I tried something like
Set PriceTotalBox = Price1Text + Price2Text
However, I know the syntax isn't right. How do I reference objects in the code? I know it uses a dot, like PriceTotalBox.form, but I'm not sure. I'm not even sure where I can name the form object itself.
In addition, because the values are currency, will there be a problem with the addition?
Any help on this would be greatly appreciated. Thanks