T
tolgainci
Guest
Hello,
I have a subform that has several fields such as "name", "date" etc. On the footer of the subform I have placed a text field named COUNT that has =Count([ID]) as the control source. On the main form I've placed another text field which has =Subform1.Form!COUNT as the source. This method works perfectly well and displays the total number of records on the subform.
However I need to calculate the number of records that have "test" in the "name" field on the subform, and display it on the main form. I have tried Dcount in the control source e.g :=DCount("[ID]", "Subform1", "[Name] = 'test'"). This approach does actually count the number of "test"s, but unlike the count function it totally ignores the relationships. As a results it displays the number of "test"s from all of the records in the table that the subform is linked to.
I hope you get the picture. I'm very new to Access design as you might have noticed and have little programming background. I would greatly appreciate any help.
Thanx in advance!
I have a subform that has several fields such as "name", "date" etc. On the footer of the subform I have placed a text field named COUNT that has =Count([ID]) as the control source. On the main form I've placed another text field which has =Subform1.Form!COUNT as the source. This method works perfectly well and displays the total number of records on the subform.
However I need to calculate the number of records that have "test" in the "name" field on the subform, and display it on the main form. I have tried Dcount in the control source e.g :=DCount("[ID]", "Subform1", "[Name] = 'test'"). This approach does actually count the number of "test"s, but unlike the count function it totally ignores the relationships. As a results it displays the number of "test"s from all of the records in the table that the subform is linked to.
I hope you get the picture. I'm very new to Access design as you might have noticed and have little programming background. I would greatly appreciate any help.
Thanx in advance!