B
Brigitte P
I have a report that has in the detail section several subreports and the
header and footer info is from another query. All works very well, except I
want users to be alerted when the failed to enter a report date that should
be displayed in the footer (it is based on a field in an underlying query,
but we don't want to make the field mandatory because the report date may be
later then the data entry date for the other fields). So users may go back
after completion of all other data entry and add the Report date once they
are ready for it.
I used something as simple as =IIf(IsNull([Report Date]),"Missing
Date",[Report Date]), tried this in code with msgBox, as an expression, and
in any other form I can think of. I put it in the ReportOpen Event and also
tried it in the OnFormat or OnPrint in the Footer, but it completely ignors
my code and just prints the report without the report date (when the report
date is entered, all is well). Ideally, it should come out
=IIf(IsNull([Report Date]),"Missing Date",Format[Report Date])"mmmm dd"",
""yyyy"); if date is missing cancels the report open event, and setfocus on
a command button in the selection form.
I also tried to put the code in the command button that opens the report,
but it also ignors me. Why? this seems so straight forward. Can anyone help?
Thanks.
Brigitte P.
header and footer info is from another query. All works very well, except I
want users to be alerted when the failed to enter a report date that should
be displayed in the footer (it is based on a field in an underlying query,
but we don't want to make the field mandatory because the report date may be
later then the data entry date for the other fields). So users may go back
after completion of all other data entry and add the Report date once they
are ready for it.
I used something as simple as =IIf(IsNull([Report Date]),"Missing
Date",[Report Date]), tried this in code with msgBox, as an expression, and
in any other form I can think of. I put it in the ReportOpen Event and also
tried it in the OnFormat or OnPrint in the Footer, but it completely ignors
my code and just prints the report without the report date (when the report
date is entered, all is well). Ideally, it should come out
=IIf(IsNull([Report Date]),"Missing Date",Format[Report Date])"mmmm dd"",
""yyyy"); if date is missing cancels the report open event, and setfocus on
a command button in the selection form.
I also tried to put the code in the command button that opens the report,
but it also ignors me. Why? this seems so straight forward. Can anyone help?
Thanks.
Brigitte P.