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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hasdata not working 1

Status
Not open for further replies.

gimenes26

Programmer
Jan 28, 2005
16
ES
i,ve got 3 subreports on main report each with total price,
and i use the hasdata formula but still having problem..
formula for subreports on main report : =[cash jobs].[Report]![totalcomm]

on cach jobs report i`ve got : =sum([totalcomm])
and when i have no data shows #error...
i`ve changed the formula from :
text127=[cash jobs].[Report]![totalcomm]

to
text127=iff([cash jobs].[report].[hasdata]=-1,[cash jobs].[report]![text127],0)

but when i have data shows up with #error!!
how can i make both formulas wook together??
could anybody help me please??
 
Is placing IFF a typo? If you are setting the box, the command should be IIF instead.

Try Me.text127=IIf(Me.[cash jobs].Report.HasData, 0,sum([totalcomm]))

You really should not place spaces in control names though, it would make the command above much easier. Test that and see if it works. :)

HTH
Minkers
 
thank u very much for your attention but is not working.. sorry but i meant IIF , is correct in the formula...
the point is: i need that subreport total showin numbers, if the subreport has no data i need showing 0, if has data i need that formula : [cash jobs].[report]![totalcomm]

cheers
 
and thanks for the advice, i`ve changed already from:
cash jobs to cashjobs :)

can u help me with my problem please?

 
THAT IS THE FORMULA IN THE MAIN REPORT :
=IIf([CASHJOBS].Report.HasData=-1,[CASHJOBS].Report!TEXT127,0)

BUT WHEN I HAVE DATA SHOWS UP WITH ERROR...

CAN ANYBODY HELP ME PLEASE??
 
Why do you have
=IIf([CASHJOBS].Report.HasData=-1,[CASHJOBS].Report!TEXT127,0)
when it seems it should be
=IIf([CASHJOBS].Report.HasData=-1,[CASHJOBS].Report![totalcomm],0)


Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
THANK U VERY MUCH!!! U ARE THE MAN!!!!!!!!!

I`M VERY HAPPY WITH THIS WEB SITE!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top