Display value from query on sub form

glawson

Registered User.
Local time
Today, 20:01
Joined
Jul 18, 2013
Messages
14
Hi,

How can I display the count value from a query on a subform for the related/selected record?

I've tried a DLookUp without success (the text box remains empty):

=DLookUp("[CountOfMethodID]","Methods count","[MethodsRungVisitID] = Form![Form4b]")

Here's my table/query/form info:

  • Query is called "Methods Count"
  • Field of that query which I want displayed on the sub form is "CountOfMethodID"
  • Sub form is "Quarters and peals sub"
  • Main form is "Form4b"
  • Both form and sub are parent/child linked

There is a Relationship between the VisitID field in the "Visit Dates" table and the MethodsRungVisitID field of the "Methods Rung" table.

What am I doing wrong? Any help much appreciated.

Thanks
Gareth
 
Why not use the DCOUNT function directly on the query underlying the subform query instead.
 

Users who are viewing this thread

Back
Top Bottom