Report Question?

T

TotallyConfused

I have a parameter form that prompts for dates to be viewed on report. These
dates are a Start Date and an End Date. On the report the control source
reads like this: control source =[StartDate] & " and " & [EndDate] & "."

This works fine. Except for when there is no date to enter. I get a blank
date field which is fine but I get the " and ". How can I get the "and" not
to print if there is no date? Thank you for any help you can provide.
 
A

Allen Browne

How about:
=[StartDate] & IIf([StartDate] Is Null OR [EndDate] Is Null, Null, " and
") & [EndDate] & "."

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 

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