[AccessD] Sporadic "#ERROR" in Access 2007 Report Group Header

Brad Marks BradM at blackforestltd.com
Wed Mar 21 13:57:30 CDT 2012


All, 

I ran into something that I am curious about.

I have a new report that has a header for one of the report groups.

I need to put information in the header that is derived from the field
that is being used for the "group on".

This field is a code such as "A" "B" "C".  I was using a SWITCH command
to change these codes into more meaningful words for the group header.  

"A" = "Gold"
"B" = "Silver"
"C" = "Bronze"

In my testing, I would occasionally receive an "#ERROR" message.  Not
every time, just once in a while.

I then started to use an "IIF" instead of the switch command.  Again, I
would occasionally receive the "#ERROR".

Sporadic problems have always scared me.

As a result, I changed my approach and used an "IIF" in the underlying
query instead of using it in building the header field.  This seems to
work nicely.

Nevertheless, I am still curious as to why I was receiving the sporadic
errors earlier.

You feedback/insights would be most appreciated.

Thanks,
Brad



More information about the AccessD mailing list