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

Count statement 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0

For more than 0 records my output is:
Project Resource/Technology has & Count(*) &

For 0 records:
Project Resource/Technology has no records at this time.

I know it has something to do with how I am using this Count(*) part at the end.
Any suggestions?

[tt]
="Project has " IIf(Count(*)=0,"no records at this time. "," Count(*) ") & ""[/tt]

 
try
="Project has " & Dcount("*","YourTablesName") & " records at this time."
RGB

 
Carl
Assuming this is in a report and the report has a table as a data source, this should work.
="Project has " & IIf(Count([FieldInTable])=0,"no records at this time",Count([FieldInTable]) & "records.")
Should also work for a form.
RGB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top