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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Access Dcount function in access 0
Access Dcount (multiple criteria) 3
New Record SQL Linked table Error 1
dcount 1
Access MS Access DCount function problem 0
Dcount Problem 2
DCount problem redux 4
Still struggling with DCount 8

Back
Top