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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

output sqlcommand in variable

Status
Not open for further replies.

rjumelet

Programmer
Jul 5, 2002
5
NL
I want to put the output of a count-command in variable, what is the way to achieve this ?
First make a table, set the output in a row and select it. There must be a easier way.

thanks in advance

Rob
 
Either use: variable = DCount ("*", "Tablename or queryname")

or put this as a controlsource on a form or report.

You can add an optional restriction clause after the table or queryname to restrict it further.

variable = DCount ("*", "Tablename or queryname", "animal='cat'")

John

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top