Error flags

christheancient

Registered User.
Local time
Today, 12:19
Joined
Dec 28, 2002
Messages
41
I'm still plodding on with my database for those that have maybe followed me around. Now I'm trying to finalise the reports bits.

Some reports could well end up with no data in them if they do not meet various parameters - like no data for given dates. So far, so good, it should print an empty form, and I'm happy with that.

However, a couple of text labels are calculated - such as a concatenation to turn FirstName and LastName into one string. Also, in some cases, there is a calculated text label on amounts of money.

All these work fine as long as there is meaningful data to report, but if parameters are not met, these calculated fields come up with #Error. Fair enough. I accept that.

But, I haven't found a way of suppressing these messages. I've tried variations on the theme of =IIf(IsNull)) with absolutely no success. All it does is print the text of the IIf statament.

As a noddy, I've run into a brick wall (yet again - sigh) and am looking for help from people much cleverer than me.

Any ideas, folks?

TIA

Chris
 
Have you tried putting all of your calculations in your query? If not try that and see what happens:)
 
Hi Sohaila - and thanks for a quick response.

The 'money' calculations don't actually appear in any queries because the data table layout is extremely simple. Everywhere else in the database - forms etc. doing the calculation live in the current display is working fine - it is usually just calculating a Sum function.

Also, I can't see how I can use an underlying query for producing name string concatenations. And that is the one that is making the reports look really peculiar.

Chris
 
You can easily do the name strings in your query behind your report. Let's say you have 2 different fields for your first and last name, this is how you do it in a query in a new column:
Name:[FirstName]&" "&[LastName]
Now, Name becomes your field and you can call it back to your report.

You can also group your query and do the sum or other calculations in your query. To do that click on the totals button and you can see the group by under each of the fields. Choose the sum from the dropdown of the group by. I hope I am not telling you something you don't already know!
 
Sohaila

It looks as though I shall have to stop being lazy! And I shall have to create an underlying query.

As you say, no real problems in doing it except for lethargy getting in the way!

I had been hoping to be a smarty pants and make myself look all whizzy and clever by doing it in the report itself. No such luck this time!

Oh well, here we go...

Thanks for your help.

Chris
 
Ah ha!

I really should look at these properties thingies properly. I've found the On No Data property and made it display a message box saying that there is no data for these criteria.

Chris, in future, if in doubt, RTFM!
 

Users who are viewing this thread

Back
Top Bottom