Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DCount in text box with SQL backend

Status
Not open for further replies.

sqlJunior

Technical User
Sep 22, 2002
123
TH
I used the following DCount function in an Access text box:

=DCount("[TagNo]","[Product]","[TagNo] ")

What syntax do I use to make this work now I have upsized to SQL backend?
 
Well, I know more knowlegeable people than I will respond, but don't you need some kind of criterion in the last spot of that expression? I usually write these expressions like this
=DCount("[TagNo]","[Product]","[TagNo]=forms!frminputbox![TagNoinTextbox]")

where the "forms!frm...." is a reference to text box on a form where the user has entered a value that you want to count. You could put any kind of criterion there.
 
Thanks BruceBell but there is no input required from the user as the textbox is to display a total of the TagNo's in the Product table.
 
Hi,

I'd try:

=DCount("[TagNo]","Product")



- DCD
 
Hi DseeDm

Thanks for your input but I tried and it doesn't work.

Is it possible that SQL Server doesn't support the DCount function?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top