DCount in Control Source of Text Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using a continuous form and would like to have a text box display the
number of records that exist for a specific record in a related table. I
have been trying to set the control source of the property using the DCount
Function. I am sure that I am missing something simple but if someone could
please help me that would be great.

I have tried the following expression, but it returns an error
=DCount("[MLSListNumber]","tblMLS", "[MLSListNumber] = " & [MLSListNumber] &
""")

The table that I would like to look the information up in is "tblMLS"
I would like to search in the MLSListNumber field for all records that are
equal to the text box on my form that is named "MLSListNumber"

Any help would be greatly appreciated
 
can just try this :

=DCount("*","tblMLS", "[MLSListNumber] = " & [MLSListNumber] )

I presume that the MLSListNumber is a number

- Raoul
 
Back
Top