Need help with a date field in a report

  • Thread starter Thread starter BobV
  • Start date Start date
B

BobV

Group:

I have a report with several calculated unbound textboxes that have formulas
in the Control Source. I need to use the company's beginning of the year
date in some of the unbound textboxes that are located in the Detail section
of the report. The problem is that the beginning of the year date is in a
label that is located in the header of the report, and I can't figure out
how to use it in a formula in an unbound textbox located in the Detail
section.

I want to use the beginning of the year date in an unbound textbox (located
in the Detail section) that has a Control Source with the formula:

=IIF(AcqDate>BegOfYrDate, [intDepreciationAmount],0)

However, when I print the report, the word #Error# prints. How do I convert
the label that is located in the report header into a date that I can use in
formulas in the unbound textboxes on the report?

Thanks,
Bob
 
Try something along the lines of

=IIf(CDate(acqDate.Value)>CDate(begOfYrDate.Caption),intDepreciationAmount.Value,0)

Hope That Helps
Gerald Stanley MCSD
 
I think you are using the Label Control. Just use the TextBox Control instead. and write the formula in the Control Source of the TextBox. That will work

----- BobV wrote: ----

Group

I have a report with several calculated unbound textboxes that have formula
in the Control Source. I need to use the company's beginning of the yea
date in some of the unbound textboxes that are located in the Detail sectio
of the report. The problem is that the beginning of the year date is in
label that is located in the header of the report, and I can't figure ou
how to use it in a formula in an unbound textbox located in the Detai
section

I want to use the beginning of the year date in an unbound textbox (locate
in the Detail section) that has a Control Source with the formula

=IIF(AcqDate>BegOfYrDate, [intDepreciationAmount],0

However, when I print the report, the word #Error# prints. How do I conver
the label that is located in the report header into a date that I can use i
formulas in the unbound textboxes on the report

Thanks
Bo
 
Back
Top