November 15, 20178 yr This is pretty a simple request that does not seem to work. I have two tables Parent and Child. I want the Parent record (of which there is only) to display the number of Child records in each parent set. In the Child table I have field 'k one' (a calc with a value of 1). In the Parent I have a calc field Count(Child::k one). No matter what I do the value is always 1 on all of the parent records, but it should read 25, 65, 44, etc depending on the number of child related records. What am I missing? Thanks in advance, David
November 16, 20178 yr First place to check is to make sure the calculation is unstored (in the field definition dialog, click options, then Storage options, then check the "Do not store..." checkbox.
November 16, 20178 yr Author Yes it is unstored. The relationship works for other uses, just not for the Count function. This is so simple and also very confusing. This is the calc: Count ( Tracks::k one )
November 16, 20178 yr To me, there are better ways to count child records: 1. create a summary field in the child table, count_of_records = count of primary key. Display that field on the parent form. 2. create a count (relationship_from_parent_to_child::child_primary_key) in the parent table. 3. Use SQL. Really no need for a dedicated "k one" field in the child.
November 16, 20178 yr Author I also tried option1. The calculation in the child table is correct, but when I display that in the parent table it is 0. It is almost like it is totally ignoring the relationship, but the relationship is simple connection of two number fields that DO match. Just for reference I tried approach 1 & 2 in a new solution and it worked fine.
November 16, 20178 yr Author Just figured it out. I had two fields named the same, but one had an underscore. Thanks for the input though.
Create an account or sign in to comment