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

display the number of not null fields

Status
Not open for further replies.

sdavid74

Technical User
May 28, 2002
21
US
I want to display the number of fields that contain "not null" values. I can do it on a report...in a roundabout way...what I did was a DCount function on one field, then the other..in two separate control boxes, and then added them together in another control box(TotalParent).....I'm sure
it's the scenic route through a bad neighborhood.

Anyway...I want to put that number on my main form page, and I'm having trouble. I've tried

=[Reports]![Parent Query]![TotalParent]

What can I do to calculate the number of not null values in "field_1" and "field_2", which reside in the report (Parent Query), and display the number on MainForm?
 
Use Count, specifying the field name you want to count . . it will return a row count of the rows in which the field is not null . .

=Count(field_1)


btw, don't use =Count(*) . .. you'll get all the rows - - - -

Bryan
 
Did the response to this cross-posted thread not work?

thread181-283980 - - - -

Bryan
 
It work to count one field, but I was trying to add the number of not nulls in two separate fields and and then display that number on a form different than the one the fields are on. I used the Dcount function, specified the field and table name for each field being counted, and joined them with "+".

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top