mreference
Registered User.
- Local time
- Today, 23:11
- Joined
- Oct 4, 2010
- Messages
- 137
I have a unbound field in my form footer that calculates the qty of products sold in 30 days.
Instead of this I want to creat a series of small command buttons for 7 days, 14 days, 30 days etc
How do I assign a number to a command button, so that then when the user clicks one of the buttons it will change the formula above and display the new quantity.
Also, if no button is pressed, I want it to default to 0.
------------------------------------------------------------------------------------------
I did try creating an unbound box, allowing the user to input the number of days, on clicking the button it converted the days to negative figure. I then tried to assign the field to the code above but it came back with #Error in all my other calculated fields.
Code:
=Sum(IIf(Left([Ord_Ref_Own],1)>"J" And [Ord_Date]>DateAdd("d",[B][COLOR=Red]-30[/COLOR][/B],Date()),[Qty],0))
How do I assign a number to a command button, so that then when the user clicks one of the buttons it will change the formula above and display the new quantity.
Also, if no button is pressed, I want it to default to 0.
------------------------------------------------------------------------------------------
I did try creating an unbound box, allowing the user to input the number of days, on clicking the button it converted the days to negative figure. I then tried to assign the field to the code above but it came back with #Error in all my other calculated fields.