R
rob mccoy via AccessMonster.com
Hello - I'm trying to figure out what the code should look like when entered as the control source in a field that totals the numerical values in another field - based on a date entry in yet another field.
This is what I'm working with: a subform that keeps track of employee occurrence info. This subform has the following fields:Last Name(links subform to main form), # of occurrences, Date recieved, and # of occurrences in the last 12 months. I'm trying to make this last field display the results of a calculation based on the data in the [# of occurrences] & [date recieved] fields w/in the last 12 months. The code/expresion that I came up with looks like this:
=sum[occurrences recieved]if[date recieved]<dateadd("m",-12,date())
All I get is : "Syntax Error. You may be missing an operand/operator" - or something like that.
Can anyone help?
This is what I'm working with: a subform that keeps track of employee occurrence info. This subform has the following fields:Last Name(links subform to main form), # of occurrences, Date recieved, and # of occurrences in the last 12 months. I'm trying to make this last field display the results of a calculation based on the data in the [# of occurrences] & [date recieved] fields w/in the last 12 months. The code/expresion that I came up with looks like this:
=sum[occurrences recieved]if[date recieved]<dateadd("m",-12,date())
All I get is : "Syntax Error. You may be missing an operand/operator" - or something like that.
Can anyone help?