Why do I lose one variable in report but not another?

D

David Habercom

I am totally buffaloed by this.

I run a report from a form. The form collects two variables, a string and
an integer. The report accepts the string but persists in calling for the
integer. (The Immediate Window confirms that the variables are defined
just before DoCmd.OpenReport.)

The integer is intFYDate.

The trouble in the report occurs in this and a similar textbox:

="Fiscal Year " & [intFYDate] & " (July 1, " & [intFYDate]-1 & " - June 30,
" & [intFYDate] & ")"

The result should be: Fiscal Year 2003 (July 1, 2002 - June 30, 2003)

Can somebody please tell me what I am missing?

Thanks.

David
 
G

George Lob

Try:

="Fiscal Year " & [Forms]![form_name_here]![intFYDate] & " (July 1, " & _
[Forms]![form_name_here]![intFYDate]-1 & " - June 30, " & _
[Forms]![form_name_here]![intFYDate] & ")"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top