G
Guest
Hello,
I'm using an update query in my database and based on the value of "fiscal
month" is in the main form, I want the fields to update to either the Actual
numbers or the budgeted number. Here is an example of my code for October
where Forms!Main!Fiscal Month is the field that houses the current month
which is 3/1/2007.
IIf(Month([Forms]![Main]![Fiscal Month])>="10",[Oct Actual],[Budget Oct])
IIf(Month([Forms]![Main]![Fiscal Month])>="11",[Nov Actual],[Budget Nov])
IIf(Month([Forms]![Main]![Fiscal Month])>="12",[Dec Actual],[Budget Dec])
The problem is with these 3 months. The "actuals" are zeros for October -
December since the month is only March and the budgeted amount has numbers
for these months. For some reason, the code is thinking that "3" (march)
Does anyone know why this may be happening? Please let me know if I'm being
unclear.
Thanks,
MN
I'm using an update query in my database and based on the value of "fiscal
month" is in the main form, I want the fields to update to either the Actual
numbers or the budgeted number. Here is an example of my code for October
where Forms!Main!Fiscal Month is the field that houses the current month
which is 3/1/2007.
IIf(Month([Forms]![Main]![Fiscal Month])>="10",[Oct Actual],[Budget Oct])
IIf(Month([Forms]![Main]![Fiscal Month])>="11",[Nov Actual],[Budget Nov])
IIf(Month([Forms]![Main]![Fiscal Month])>="12",[Dec Actual],[Budget Dec])
The problem is with these 3 months. The "actuals" are zeros for October -
December since the month is only March and the budgeted amount has numbers
for these months. For some reason, the code is thinking that "3" (march)
=10, 11 and 12 and putting zeros in these fields.
Does anyone know why this may be happening? Please let me know if I'm being
unclear.
Thanks,
MN