Hello,
I have a form with the following fields:
Actually I have more but to make it simple I will look at three.
1. Month
2. Sales
3. JanSales
When Jan is entered in the month field I want JanSales to equal Sales. I know I can do this with an IF statement using one of the properties of the JanSales field or I could us an IIF statment in the control source. I would rather us a FUNCTION (at least I think this will work) but I'm not sure how to do it. Here is what I have tried.
Private JanSales() as Double
JanSales = Sales
end function
I put =JanSales() in the control source of the JanSales field but this field is displaying #Error. I can't figure out why. Any ideas would be greatly appreciated.
Thanks,
Stacy
I have a form with the following fields:
Actually I have more but to make it simple I will look at three.
1. Month
2. Sales
3. JanSales
When Jan is entered in the month field I want JanSales to equal Sales. I know I can do this with an IF statement using one of the properties of the JanSales field or I could us an IIF statment in the control source. I would rather us a FUNCTION (at least I think this will work) but I'm not sure how to do it. Here is what I have tried.
Private JanSales() as Double
JanSales = Sales
end function
I put =JanSales() in the control source of the JanSales field but this field is displaying #Error. I can't figure out why. Any ideas would be greatly appreciated.
Thanks,
Stacy