Count in an Unbound Textbox

ddrew

seasoned user
Local time
Today, 07:35
Joined
Jan 26, 2003
Messages
911
Im sure this has been asked before but I cant find a thread.
I have a form tht has an Unbound textbox on it. I need it to show the total records in a table (not the table that the form is associated to). I know I need to use the count functio but cant find a simple explanation of it. I guess its somethinkgon the lines of:
Code:
=Count(tbl_Contacts)
but that just shows #Error
 
Use DCount and count a particular field in the table:

Code:
Me.MyTextBoxName = DCount("FieldName","tblName")
 
Or simply

Me.MyTextBoxName = DCount("*","tblName")

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom