Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi Everyone In my report I want

Status
Not open for further replies.

teebird

Technical User
Dec 11, 2001
239
Hi Everyone

In my report I want to display another word in replace of the field name if the field is null: The last group of records are not allocated to anyone and the report displays "Records not allocated"

My Report

Billy
200
300
400

Fred
900
500
800

Record not allocated
600
700
100

Many thanks for any help
tee
 
you want to modify your controlsource for the textbox that holds the persons name.

Change it to:
=iif(isnull([??query column for the name]),"Records not allocated",[??query column for the name])

The [??query column for the name] is from the query of the recordsource.
 
Hi John

Many thanks for your reply - I have changed [??query column for the name] to the name of my query [qryHearings] and [??query column for the name] to my column [ProsID]

But now I get the parameter prompt box for the qryhearings and the records that have been allocated do not show who to now.

Many thanks for your help anyway.

tee
 
Hi John (again)

I reread your reply and corrected the [??query column for the name] to my Name [ProsID]in both places. But it still does not display "Records not allocated" in the blank fields.

Tahnks again.
tee
 
Hi John (again)

I reread your reply and corrected the [??query column for the name] to my Name [ProsID]in both places. But it still does not display "Records not allocated" in the blank fields.

Thanks again.
tee
 
try this for the controlsource:
=iif(isnull([??query column for the name] or Len([??query column for the name]) < 1,&quot;Records not allocated&quot;,[??query column for the name])

Also, it looks like the [ProsId] is a number, not a name.
 
Hi John
Tried your 2nd suggestion - but I have a error message incorrect arguements.

Many thanks again
tee
 
I forgot a paren.

=iif(isnull([??query column for the name]) or Len([??query column for the name]) < 1,&quot;Records not allocated&quot;,[??query column for the name])
 
Hi John

Many thanks for your help - I do appreciate it but I give up - I changed my code to this - but it is still not showing &quot;Records not allocated&quot;

=IIf(IsNull([ProsID]) Or Len([ProsID])<1,&quot;Records not allocated&quot;,[ProsID])

Must be something else in my report or the way I have set up the query.

Cheers
tee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top