Conditional Text Box

  • Thread starter Thread starter Ana
  • Start date Start date
A

Ana

I have a report that in first place opens a form to enter
criterias for the source query.
I would like to show on the report title the criteria of
the search in case that there are somo of them.
For example if the user enter dates, then a text box will
appear on the tittle "From xx/xx/xx to xx/xx/xx" , but if
thre not filters selected, then don´t show the text box

Thank you very much
 
I have a report that in first place opens a form to enter
criterias for the source query.
I would like to show on the report title the criteria of
the search in case that there are somo of them.
For example if the user enter dates, then a text box will
appear on the tittle "From xx/xx/xx to xx/xx/xx" , but if
thre not filters selected, then don´t show the text box

Thank you very much

In the Report Header add an unbound control.
Set it's control source to:
=IIf IsNull(forms!FormName!StartDate),"","From " &
Format(forms!FormName!StartDate,"mm/dd/yy") & " to " &
Format(forms!FormName!EndDate,"mm/dd/yy")

Change forms!formName!StartDate (and EndDate) to whatever the actual
name of the form and control names are.
 
Thank you very very much

-----Original Message-----


In the Report Header add an unbound control.
Set it's control source to:
=IIf IsNull(forms!FormName!StartDate),"","From " &
Format(forms!FormName!StartDate,"mm/dd/yy") & " to " &
Format(forms!FormName!EndDate,"mm/dd/yy")

Change forms!formName!StartDate (and EndDate) to whatever the actual
name of the form and control names are.


--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
Back
Top